dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 61165dca1ddf0095bb0f69fd96fbf41ba03dd442
parent 30ee28c3e50c1fa052dadfda3c3f5005d73083c8
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Tue, 11 Feb 2014 09:31:17 +0100

Use hybrid sleep script with xscreensaver and pm suspend

Diffstat:
M.config/sxhkd/sxhkdrc | 2+-
M.xinitrc | 3+++
Abin/zzz | 17+++++++++++++++++
3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -120,7 +120,7 @@ super + shift + t tor-browser.sh super + z - /home/adc/bin/zzz-i3 + /home/adc/bin/zzz # mpd control super + shift + p diff --git a/.xinitrc b/.xinitrc @@ -87,6 +87,9 @@ if [[ "$HOSTNAME" == 'iddqd' ]]; then xrandr --output DP-1 --auto --left-of DVI-D-0 fi +# Start screensaver daemon +/usr/bin/xscreensaver -no-splash & + #exec i3 sxhkd & diff --git a/bin/zzz b/bin/zzz @@ -0,0 +1,17 @@ +#!/bin/bash + +# Screen locking and power suspending script. +# The laptop should be locked and suspended, while the desktop should only be +# locked. + +HOSTNAME=`hostname` + +if [[ "$HOSTNAME" == 'flaptop' ]]; then + killall ssh +fi +mpc stop +xscreensaver-command --lock + +if [[ "$HOSTNAME" == 'flaptop' ]]; then + pm-suspend +fi