summaryrefslogtreecommitdiff
path: root/xinitrc
diff options
context:
space:
mode:
Diffstat (limited to 'xinitrc')
-rwxr-xr-xxinitrc62
1 files changed, 31 insertions, 31 deletions
diff --git a/xinitrc b/xinitrc
index 161eb49..9d58fc7 100755
--- a/xinitrc
+++ b/xinitrc
@@ -6,17 +6,17 @@
# {{{ Environment settings
#
export OOO_FORCE_DESKTOP="gnome"
-errorlog="$HOME/.xsession-errors"
-gnupglog="$HOME/.gnupg/gpg-agent.info"
+errorlog="${HOME}/.xsession-errors"
+gnupglog="${HOME}/.gnupg/gpg-agent.info"
# }}}
# {{{ Log settings
#
# Always start X11 with a clean log file
-if ( cp /dev/null "$errorlog" 2>/dev/null ); then
- chmod 600 "$errorlog"
- exec >"$errorlog" 2>&1
+if ( cp /dev/null "${errorlog}" ); then
+ chmod 600 "${errorlog}"
+ exec >"${errorlog}" 2>&1
break
fi
# }}}
@@ -25,78 +25,78 @@ fi
# {{{ Display settings
#
# Ignore reported display size and force DPI
-#/usr/bin/xrandr --dpi 96
+#xrandr --dpi 96
# Force LVDS as the primary screen
-#/usr/bin/xrandr --output LVDS1 --primary
+#xrandr --output LVDS1 --primary
# }}}
# {{{ Resource and keymap settings
-usermodmap="$HOME/.Xmodmap"
-userresources="$HOME/.Xresources"
+usermodmap="${HOME}/.Xmodmap"
+userresources="${HOME}/.Xresources"
sysmodmap="/etc/X11/xinit/.Xmodmap"
sysresources="/etc/X11/xinit/.Xresources"
# Merge system and user resources and keymaps
-[ -f $sysresources ] && /usr/bin/xrdb -merge $sysresources
-[ -f $sysmodmap ] && /usr/bin/xmodmap $sysmodmap
-[ -f $userresources ] && /usr/bin/xrdb -merge $userresources
-[ -f $usermodmap ] && /usr/bin/xmodmap $usermodmap
+[[ -r "${sysresources}" ]] && xrdb -merge "${sysresources}"
+[[ -r "${sysmodmap}" ]] && xmodmap "${sysmodmap}"
+[[ -r "${userresources}" ]] && xrdb -merge "${userresources}"
+[[ -r "${usermodmap}" ]] && xmodmap "${usermodmap}"
# }}}
# {{{ Input settings
#
# Keyboard control, repeat delay and repeat rate
-/usr/bin/xset r rate 200 30
+xset r rate 200 30
# Pointer control, acceleration and threshold
-#/usr/bin/xset m 30/10 4
+#xset m 30/10 4
# Pointer appearance
# - xcb does not support Xcursor yet
-/usr/bin/xsetroot -cursor_name left_ptr
+xsetroot -cursor_name left_ptr
# Fix broken HAL key mappings
# - Lock key, Presentation key, Sync key
-/usr/bin/sudo /usr/bin/setkeycodes e06e 152
-/usr/bin/sudo /usr/bin/setkeycodes e075 217
-/usr/bin/sudo /usr/bin/setkeycodes e079 173
+sudo /usr/bin/setkeycodes e06e 152
+sudo /usr/bin/setkeycodes e075 217
+sudo /usr/bin/setkeycodes e079 173
# - Euro key, Dollar key
-/usr/bin/sudo /usr/bin/setkeycodes e033 159
-/usr/bin/sudo /usr/bin/setkeycodes e034 151
+sudo /usr/bin/setkeycodes e033 159
+sudo /usr/bin/setkeycodes e034 151
# }}}
# {{{ Autostart settings
#
# Play a startup sound
-/usr/bin/ogg123 -q "$HOME/.fvwm/sounds/Dream/Startup.ogg" &
+ogg123 -q "${HOME}/.fvwm/sounds/Dream/Startup.ogg" &
# Start the GnuPG agent and enable OpenSSH agent emulation
-if ( /bin/pidof gpg-agent >/dev/null ); then
- eval "$(cat $gnupglog)"
- eval "$(cut -d= -f1 $gnupglog | xargs echo export)"
+if ( pgrep -u "${USER}" gpg-agent ); then
+ eval `cat $gnupglog`
+ eval `cut -d= -f1 $gnupglog | xargs echo export`
else
- eval "$(gpg-agent --enable-ssh-support --daemon)"
+ eval `gpg-agent --enable-ssh-support --daemon`
fi
# Start the GNU Emacs daemon
-[ -e "/tmp/emacs$UID/server" ] || /usr/bin/emacs --daemon &
+[[ -r "/tmp/emacs${UID}/server" ]] || emacs --daemon &
# Xwrits reminds you to take wrist breaks and avoid RSI
-/usr/bin/xwrits typetime=45 clock breakclock top ready-picture="$HOME/.xwrits/ready.gif" \
- rest-picture="$HOME/.xwrits/rest.gif" warning-picture="$HOME/.xwrits/warning.gif" &
+xwrits typetime=45 clock breakclock top ready-picture="${HOME}/.xwrits/ready.gif" \
+ rest-picture="${HOME}/.xwrits/rest.gif" warning-picture="${HOME}/.xwrits/warning.gif" &
# Open a terminal emulator on the first tag
# - resume the old screen session or start a new one
-/usr/bin/urxvt -e screen -l -UDRS term &
+urxvt -e screen -l -UDRS term &
# }}}
# {{{ Window manager selection
-case $1 in
+case "$1" in
twm)
exec twm
;;