Using a custom startup script for xmonad

28 May 2014 in TIL

As lightdm doesn't call .xinitrc, I needed to find another way to start things like trayer. The easiest way is to create a file called .start-xmonad in your home directory, and point the lightdm launcher to it.

Here's what my file looks like:

trayer --edge bottom --width 20 --height 22 --transparent true --tint 0x3c3b37 --alpha 0 &
dropbox start &
nm-applet &
xsetroot -cursor_name left_ptr
setxkbmap -layout uk
dconf write /org/gnome/settings-daemon/plugins/xrandr/active false
feh --bg-fill ~/Documents/current-wallpaper.png

To make the launcher use this, I needed to edit /usr/share/xsessions/xmonad.desktop. It looks like this:

[Desktop Entry]
Comment=Lightweight tiling window manager

Now, when I launch xmonad my custom setup stuff is run too