mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-06 03:04:58 +02:00
xss-lock: use a simpler process to dim display
Just set a low brightness.
This commit is contained in:
parent
9910ae4c11
commit
80cd6d2c26
3 changed files with 13 additions and 5 deletions
13
bin/xss-lock
13
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"
|
||||
;;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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" } },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue