diff --git a/bin/xss-lock b/bin/xss-lock index 0e5c12a..1dcebac 100755 --- a/bin/xss-lock +++ b/bin/xss-lock @@ -20,9 +20,20 @@ case "$1" in ;; dim|notify) echo "notify: start" + redshift=$(systemctl --user show \ + --property MainPID \ + --value redshift@$(systemd-escape -- "$DISPLAY").service) + [ x$redshift = x ] || { + kill -STOP $redshift + trap "kill -CONT $redshift" EXIT + } trap 'echo notify: user activity; kill %% 2> /dev/null; exit 0' HUP # user activity trap 'echo notify: locker started; kill %% 2> /dev/null; exit 0' TERM # locker started - /usr/lib/xscreensaver/bsod & + outputs=($(xrandr -q | sed -n 's/\([^ ]*\) connected .*/\1/p')) + for out in ${outputs[@]}; do + xrandr --output $out --brightness 0.2 + done + sleep infinity & wait echo "notify: end" ;; diff --git a/rc/rules.lua b/rc/rules.lua index d1fa465..a3dac68 100644 --- a/rc/rules.lua +++ b/rc/rules.lua @@ -13,9 +13,6 @@ awful.rules.rules = { -- i3lock { rule = { name = "i3lock" }, properties = { ontop = true } }, - -- Apple2 - { rule = { class = "BSOD" }, - properties = { fullscreen = true, ontop = true, floating = true, sticky = true } }, -- Browser stuff { rule = { role = "browser" }, callback = function(c) diff --git a/rc/tags.lua b/rc/tags.lua index 4aa96df..66935c3 100644 --- a/rc/tags.lua +++ b/rc/tags.lua @@ -64,7 +64,7 @@ shifty.config.apps = { intrusive = true, -- Display even on exclusive tags }, { - match = { class = { "Key[-]mon", "BSOD" }, + match = { class = { "Key[-]mon" }, role = { "pop[-]up" }, name = { "Firebug" }, instance = { "plugin[-]container", "exe" } },