+ screensaver status

This commit is contained in:
committer
2024-05-23 06:26:29 -05:00
parent 2ece893158
commit 74c3b1ddad
2 changed files with 17 additions and 4 deletions

View File

@@ -51,8 +51,11 @@ screensaver() {
if [ ${cmd} == "on" ] ; then
xset dpms
# tmp file used by i3status - by default screensaver is on, so no need for "screensaver_on.tmp"
trash-put "/tmp/screensaver_off.tmp"
elif [ ${cmd} == "off" ] ; then
xset -dpms
touch "/tmp/screensaver_off.tmp"
elif [ ${cmd} == "reset" ] ; then
if xset -q | grep -q 'DPMS is Enabled' ; then
xset -dpms
@@ -66,11 +69,14 @@ screensaver() {
}
# display setup
alias ds11_info="echo '1 laptop + 1 monitor'"
ds11() {
xrandr --output eDP-1 --mode 1920x1080 --pos 0x1080 --rotate normal --output DP-1 --off --output HDMI-1 --primary --mode 3840x2160 --pos 1920x0 --rotate normal --output DP-2 --off --output HDMI-2 --off --output DP-3 --off --output HDMI-3 --off
nr
xrdb ~/.Xresources
if [ $2 == "info" ] ; then
echo "1 laptop + 1 monitor"
else
xrandr --output eDP-1 --mode 1920x1080 --pos 0x1080 --rotate normal --output DP-1 --off --output HDMI-1 --primary --mode 3840x2160 --pos 1920x0 --rotate normal --output DP-2 --off --output HDMI-2 --off --output DP-3 --off --output HDMI-3 --off
nr
xrdb ~/.Xresources
fi
}
# # Change the window title of X terminals