Files were moved and updated. Deleting old.
This commit is contained in:
parent
bbd69f5e73
commit
c419c8d2ed
|
@ -1,36 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
BLFILE="/tmp/blc"
|
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
|
||||||
echo "Missing argument: swayidlerun, swayidlewarn, swayidlesleep or" \
|
|
||||||
" swayidlewake"
|
|
||||||
elif [ $1 == "swayidlerun" ]; then
|
|
||||||
swayidle timeout 270 "/home/jpm/scripts/swayidle.sh swayidlewarn" \
|
|
||||||
before-sleep "/home/jpm/scripts/swayidle.sh swayidlesleep" \
|
|
||||||
resume "/home/jpm/scripts/swayidle.sh swayidlewake"
|
|
||||||
elif [ $1 == "swayidlewarn" ]; then
|
|
||||||
# Store current brightness
|
|
||||||
echo $(/home/jpm/bin/blc.pl %) > $BLFILE
|
|
||||||
# Dim display
|
|
||||||
/home/jpm/bin/blc.pl = 1
|
|
||||||
# Warning notifications
|
|
||||||
/home/jpm/scripts/swayidlecountdown.sh
|
|
||||||
elif [ $1 == "swayidlesleep" ]; then
|
|
||||||
# Change nick to AFK
|
|
||||||
ssh jpm@john.me.tz -i /home/jpm/.ssh/no_pass -t \
|
|
||||||
'screen -S irssi -X stuff "/nick jpmAFK^M"'
|
|
||||||
# Turn off monitor
|
|
||||||
swaymsg 'swaymsg "output * dpms off"'
|
|
||||||
# Lock screen
|
|
||||||
swaylock -c 323232
|
|
||||||
elif [ $1 == "swayidlewake" ]; then
|
|
||||||
# Kill sleep if running
|
|
||||||
# Turn on monitor
|
|
||||||
swaymsg 'swaymsg "output * dpms on"'
|
|
||||||
# Restore brightness level
|
|
||||||
kill `pgrep swayidlecountdo`
|
|
||||||
/home/jpm/bin/blc.pl = $(cat /tmp/blc)
|
|
||||||
else
|
|
||||||
echo "Invalid argument: run, sleep or wake"
|
|
||||||
fi
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
for i in `seq 0 30`; do
|
|
||||||
notify-send -t 999 "Sleeping" $(expr 30 - $i); sleep 1
|
|
||||||
done
|
|
Loading…
Reference in New Issue