dotfiles

Clean dotfiles
git clone git://git.dimitrijedobrota.com/dotfiles.git
Log | Files | Refs

xinitrc (894B)


      1 #!/bin/sh
      2 
      3 userresources=$XDG_CONFIG_HOME/X11/Xresources
      4 usermodmap=$XDG_CONFIG_HOME/X11/Xmodmap
      5 sysresources=/etc/X11/xinit/.Xresources
      6 sysmodmap=/etc/X11/xinit/.Xmodmap
      7 
      8 # merge in defaults and keymaps
      9 
     10 if [ -f $sysresources ]; then
     11     xrdb -merge $sysresources
     12 fi
     13 
     14 if [ -f $sysmodmap ]; then
     15     xmodmap $sysmodmap
     16 fi
     17 
     18 if [ -f "$userresources" ]; then
     19     xrdb -merge "$userresources"
     20 fi
     21 
     22 if [ -f "$usermodmap" ]; then
     23     xmodmap "$usermodmap"
     24 fi
     25 
     26 # start some nice programs
     27 
     28 if [ -d /etc/X11/xinit/xinitrc.d ] ; then
     29  for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
     30   [ -x "$f" ] && . "$f"
     31  done
     32  unset f
     33 fi
     34 
     35 if command -v slstatus &> /dev/null; then
     36     slstatus 2>&1 >/dev/null &
     37 else
     38     echo "Warning: slstatus does not exist!"
     39 fi
     40 
     41 if command -v dwm &> /dev/null; then
     42     while true; do
     43         dwm && continue || break
     44     done
     45 else
     46     echo "Error: dwm does not exist!"
     47     exit 1
     48 fi