diff --git a/bin/xsettingsd-setup b/bin/xsettingsd-setup index 1ea2a41..de1c02d 100755 --- a/bin/xsettingsd-setup +++ b/bin/xsettingsd-setup @@ -3,7 +3,7 @@ DISPLAY=${DISPLAY%.0} # For information -xrandr \ +xrandr --current \ | sed -n 's/^\([^ ]\)* connected.* \([0-9]*\)x.* \([0-9]*\)mm x .*/\1 \2 \3/p' \ | while read output pixels mm; do dpi=$(($pixels * 25.4 / $mm)) diff --git a/bin/xss-lock b/bin/xss-lock index fcc8c9c..1776aa7 100755 --- a/bin/xss-lock +++ b/bin/xss-lock @@ -24,7 +24,7 @@ case "$1" in trap "systemctl --user kill -s CONT redshift@$(systemd-escape -- "$DISPLAY").service" 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 - outputs=($(xrandr -q | sed -n 's/\([^ ]*\) connected .*/\1/p')) + outputs=($(xrandr --current | sed -n 's/\([^ ]*\) connected .*/\1/p')) for out in ${outputs[@]}; do xrandr --output $out --brightness 0.2 done