/.xmonad

Primary LanguageHaskell

Xmonad Config

Setup

  • Clone this repository in $HOME/.xmonad.

Ranger File manager

Requiremnets

  • Google chrome uses Dbus
yay -S xdg-desktop-portal xdg-desktop-portal-xapp xdg-desktop-portal-termfilechooser-git kitty python-pydbus --noconfirm

Configure XDG Desktop Portal

Create xdg-desktop-portal config

  • $HOME/.config/xdg-desktop-portal/portals.conf
[preferred]
default=xapp
org.freedesktop.impl.portal.FileChooser=termfilechooser;xapp;
org.freedesktop.FileManager1=xapp;

Create termfilechooser config

  • $HOME/.config/xdg-desktop-portal-termfilechooser/config
[filechooser]
cmd=/usr/share/xdg-desktop-portal-termfilechooser/ranger-wrapper.sh

Xmonad Startup Setup

Running xdg-termfilechooser config

  • Manually start xdg-deskto-portal-termfilechooser by the command below
    • You can start it by systemd
  • FileChooser dbus
/usr/lib/xdg-desktop-portal-termfilechooser -c $HOME/.config/xdg-desktop-portal-termfilechooser/config -l DEBUG
# systemctl --user enable --now xdg-desktop-portal-termfilechooser

Change FileManger

  • FileManager1 dbus
PYTHONPATH=$HOME/.xmonad/py python -m ranger-dbus.py &

Configure Environments

  • ~/.xinitrc setup.
export DE='xfce'
export GTK_THEME=Adwaita:dark
export XDG_SESSION_TYPE=x11
export GTK_IM_MODULE='ibus'
export QT_IM_MODULE='ibus'
export XMODIFIERS='@im=ibus'
export GLFW_IM_MODULE=ibus
exec xmonad &> ~/xmonad.log

Drag and drop

  • Install drag and drop tool.
yay -S dragon-drop --noconfirm
  • Add the below line to the end of .config/ranger/rc.conf.
map <C-d> shell dragon-drop -a -x %p

Emacs Anywhere

  • Refer to the emacs anywhere github
yay -S xclip xdotool xorg-xwininfo
curl -fsSL https://raw.github.com/zachcurry/emacs-anywhere/master/install | bash

KDE Desktop Setup

Configure KDE Desktop

  • Setting $HOME/.xinitrc file
export GTK_THEME=Adwaita:dark
export XDG_SESSION_TYPE=x11

export DE='kde'
export XDG_CURRENT_DESKTOP=KDE
export KDE_SESSION_VERSION=5
export XDG_MENU_PREFIX=plasma-
export XDG_CONFIG_DIRS=/home/hackartist/.config/kdedefaults:/etc/xdg

exec xmonad &> ~/xmonad.log

Starting X11

  • Guarantee stopping xdg-desktop-portal
    • Execute the below command if you are trying to run X11 twice or more.
systemctl stop --user xdg-desktop-portal.service

Link ranger kdialog

sudo ln -s $HOME/.xmonad/bin/ranger-kdialog /usr/local/bin/kdialog