diff --git a/sway/swayidle.sh b/sway/swayidle.sh deleted file mode 100755 index 83d47da..0000000 --- a/sway/swayidle.sh +++ /dev/null @@ -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 diff --git a/sway/swayidlecountdown.sh b/sway/swayidlecountdown.sh deleted file mode 100755 index b2cef69..0000000 --- a/sway/swayidlecountdown.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -for i in `seq 0 30`; do - notify-send -t 999 "Sleeping" $(expr 30 - $i); sleep 1 -done