diff options
Diffstat (limited to 'bin/menuscripts')
| -rwxr-xr-x | bin/menuscripts/mpower | 9 | ||||
| -rwxr-xr-x | bin/menuscripts/pomo | 12 | 
2 files changed, 16 insertions, 5 deletions
diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower index b4b8640..fb7249d 100755 --- a/bin/menuscripts/mpower +++ b/bin/menuscripts/mpower @@ -9,6 +9,15 @@ hibernate  EOF  )" +if [ "$(hostname)" = "winter" ]; then  +	if [ "$choice" = "firmware" ]; then +		systemctl reboot --firmware-setup +		exit +	fi +	systemctl "$choice" +	exit +fi +  case "$choice" in  	"suspend") doas /usr/sbin/zzz ;;  	"poweroff") doas /usr/sbin/poweroff ;; diff --git a/bin/menuscripts/pomo b/bin/menuscripts/pomo index 07db166..5b52ebd 100755 --- a/bin/menuscripts/pomo +++ b/bin/menuscripts/pomo @@ -1,7 +1,9 @@  #!/bin/sh -# time in minutes of one pomodoro +# time in minutes  [ "$SLEEP_TIME" ] || SLEEP_TIME=25 +[ "$BREAK_TIME" ] || BREAK_TIME=5 +[ "$GIGA_BREAK_TIME" ] || GIGA_BREAK_TIME=20  ### FUNCTIONS  notif() { @@ -25,7 +27,7 @@ player_command() {  # $1: time in minutes  # $2: msg for notification  ring_ring() { -	printf >&2 '%s B %s\n' "$(date '+%R')" "$round" +	printf >&2 '%s %s [%s]\n' "$(date '+%R')" "Break" "$round"  	player_command  	herbe "pomo" "$2" &  	sleep "${1}m" @@ -62,13 +64,13 @@ done  while true; do  	notif "*START" -	printf >&2 '%s S %s\n' "$(date '+%R')" "$round" +	printf >&2 '%s %s [%s]\n' "$(date '+%R')" "Start" "$round"  	sleep "${SLEEP_TIME}m"  	if [ "$round" -eq 3 ]; then -		ring_ring 20 "*GIGA BREAK TIME" +		ring_ring "$GIGA_BREAK_TIME" "*GIGA BREAK TIME"  		round=0  	else -		ring_ring 5 "*BREAK TIME" +		ring_ring "$BREAK_TIME" "*BREAK TIME"  		round=$((round + 1))  	fi  done  | 
