X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=dwmrc;fp=dwmrc;h=a7baa093c62c3e149ca23aba8de06f6f2dcc2e88;hb=4b42b2bbfaebe7e2b76ee9cd95f924ef42456378;hp=aeebe9a26518290289d8cda0987242b3dcb8f6db;hpb=86a6f4bd34058eea916904981cc8b3bef50f08c6;p=smckown%2Fdotfiles.git diff --git a/dwmrc b/dwmrc index aeebe9a..a7baa09 100755 --- a/dwmrc +++ b/dwmrc @@ -25,9 +25,20 @@ xsetroot -solid black dispcfg # Screen saver. DPMS standby -> suspend -> off in seconds -# xss-lock calls i3lock on no X activity (DPMS standby) xset dpms 300 600 1200 -(pgrep -x xss-lock || exec xss-lock -- i3lock --dpms ) & + +# Use xss-lock to call a program on no X activity (DPMS standby) +if [ -x ~/.Xidle ]; then + # If provided, .Xidle can do stuff before and after a call to 'i3lock -n' + (pgrep -x xss-lock || exec xss-lock -- ~/.Xidle ) & +elif [ -x /usr/bin/i3lock ]; then + # Fall back to i3lock, which provides a screen lock. + # Instead of --dpms use --color. This is less confusing on monitors that + # are slow to sync back up. And since X should generally have the monitor + # suspended by this point anyway, the behavior should only change in the + # case of things like an invalid password being entered. + (pgrep -x xss-lock || exec xss-lock -- i3lock --color=000000 ) & +fi # Turn off touchpad (later use a toggle) type synclient 2>/dev/null && synclient TouchpadOff=1