From 74c3b1ddad1f3fe424086c3798295e3d74dfcdad Mon Sep 17 00:00:00 2001 From: committer Date: Thu, 23 May 2024 06:26:29 -0500 Subject: [PATCH] + screensaver status --- dots/bash/.bashrc | 14 ++++++++++---- dots/i3status/config | 7 +++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dots/bash/.bashrc b/dots/bash/.bashrc index eb07974..c755ee0 100644 --- a/dots/bash/.bashrc +++ b/dots/bash/.bashrc @@ -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 diff --git a/dots/i3status/config b/dots/i3status/config index 9c94248..64d42bc 100644 --- a/dots/i3status/config +++ b/dots/i3status/config @@ -28,6 +28,7 @@ order += "path_exists vpn" order += "battery all" order += "time" order += "volume master" +order += "path_exists screensaver" cpu_usage { format = " cpu usg %usage " @@ -107,3 +108,9 @@ volume master { mixer = "Master" mixer_idx = 0 } + +path_exists "screensaver" { + format = " ⎚ " + path = "/tmp/screensaver_off.txt" + format_down = " on " +}