Dot xinitrc

File ~/.xinitrc is read by xinit and by its front-end startx. I create the file in my home directory and set it up to look for a few optional config files, disable screen blanking, clear out the trash, launch applications, and finally start the desktop.

Let's go!

Set config parameters for X client applications ...

if [ -f ~/.Xresources ]; then
    xrdb -merge ~/.Xresources
fi

Bind commands to certain keys or key combos ...

if [ -f ~/.xbindkeysrc ]; then
    xbindkeys
fi

Modify key mappings ...

if [ -f ~/.xmodmap ]; then
    xmodmap ~/.xmodmap
fi

Disable DPMS and turn off screen blanking ...

xset s off -dpms

Summon the janitor ...

if [ -d ~/.local/share/Trash ]; then
    rm -rf ~/.local/share/Trash/*
fi

Launch applications ...

~/bin/dldsply -r &
~/bin/trackpointconf &
if [ -x /usr/bin/nm-applet ]; then
    nm-applet &
fi
volnoti -t 2 &
urxvt &

Start the window manager ...

exec i3

Source: dotfiles/.xinitrc

Happy hacking!

More • dotfilesshelllinux