X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=.xsession;h=3cde1db99b4362009cca3bf00c9519c20bfdb39d;hb=652e065de4763f5d871babb6d72861d6d51f7e1b;hp=7723cc430363b6a2d4de0fc80d628c8c2d811932;hpb=15be4bb0a5f0047bd2f1fac454363683b1f4d501;p=x_base.git diff --git a/.xsession b/.xsession index 7723cc4..3cde1db 100755 --- a/.xsession +++ b/.xsession @@ -2,6 +2,14 @@ echo "Starting new session" +DATE=$(date "+%Y%m%d_%H%M%S") +# track xsession errors +mv ~/.xsession-errors ~/.xsession-errors_${DATE}; +ln -sf ~/.xsession-errors_${DATE} ~/.xsession-errors-current; +# delete old xsession error files +find ~/ -maxdepth 1 -mindepth 1 -type f \ + -iname '.xsession-errors*' -ctime +30 -delete; + if locale -a |grep -qi en_US.utf8; then LANG="en_US.UTF-8" else @@ -15,10 +23,10 @@ if [ -d ~/tmp ]; then export TMPDIR=$(echo ~/tmp) fi; -xmodmap -e 'keycode 115 = Multi_key' # No clue why this has changed from Alt_R to Down, but we really want Down. if ! xmodmap -pk|grep -qe '116.*Down'; then xmodmap -e 'keycode 116 = Super_L' + xmodmap -e 'keycode 115 = Multi_key' fi; xmodmap -e 'clear mod4' xmodmap -e 'add mod4 = Super_L Super_R' @@ -34,10 +42,16 @@ fi; # make a backup of the .Xauthority if [ -e ~/.Xauthority ]; then cp -f .Xauthority .Xauthority.bak -fi; +fi if [ -x /usr/bin/xscreensaver -a -e ~/.xscreensaver ]; then - /usr/bin/xscreensaver & + (/usr/bin/xscreensaver >/dev/null 2>&1 &) +elif [ -x /usr/bin/xautolock ]; then + (/usr/bin/xautolock -notifier true -bell 0 >/de/vnull 2>&1 &) +fi; + +if which redshift >/dev/null 2>&1; then + (redshift -l 33.9533:-117.3953 >/dev/null 2>&1 &) fi; if [ -x /usr/bin/awesome ]; then