From 2f694cefe3d30fe65320941bb5ee77472fff0e2b Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 3 Dec 2023 18:33:16 +0100 Subject: bin: Remove unused scripts Signed-off-by: David Runge --- bin/adjust_dpms | 55 ------------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100755 bin/adjust_dpms (limited to 'bin/adjust_dpms') diff --git a/bin/adjust_dpms b/bin/adjust_dpms deleted file mode 100755 index c8e8a0f..0000000 --- a/bin/adjust_dpms +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -# Script to adjust dpms settings when running certain programs, -# that don't use fullscreen, but should not be "blanked" in between. -# Programs are defined in separate config file ~/.config/dpms -# Run as timed user script (i.e. adjust_dpms@.service) with systemd -# from /etc/systemd/system/timer-minutely.target.wants - -export DISPLAY=:0.0 - -config="/home/$(whoami)/.config/dpms" -blankoff=0 - -# check for config file existence -if [[ -f $config ]];then - . /home/dave/.config/dpms -else - echo "Config file not readable $config" - exit 1 -fi - -# loop all programs and check for running instances -for i in "${programs[@]}" -do - pid=$(pidof -x $i) - re='^[0-9]+$' - if [[ $pid =~ $re ]]; then - echo "$i running ($pid)" - blankoff=1 - fi -done - -# if valuable programs are running, don't use screen blanking -if [ $blankoff -gt 0 ]; then - echo "Some program requires screensaver to be off." - # print currently set values for screensaver timeout to tmp file - echo "s $(xset q|grep timeout|awk '{print $2}') $(xset q|grep timeout|awk '{print $4}')" > $adjust_dpms - echo "dpms $(xset q|grep Standby|awk '{print $2}') $(xset q|grep Standby|awk '{print $4}') $(xset q|grep Standby|awk '{print $6}')" >> $adjust_dpms - # disable screensaver and dpms - xset s off - xset -dpms -else - xsetq=$(xset q|grep timeout|awk '{print $2}') - # if the timeout is still 0, set it to its former value, or just switch on screensaver/dpms again - if [[ $xsetq -eq 0 ]];then - if [[ -f "$adjust_dpms" ]];then - xset $(head -n1 $adjust_dpms) - xset $(tail -n1 $adjust_dpms) - rm -rf $adjust_dpms - else - xset +dpms - xset s on - fi - fi -fi - -- cgit v1.2.3-70-g09d2