mabox-tools/bin/noblank

21 lines
462 B
Plaintext
Raw Normal View History

2021-10-13 12:20:43 +02:00
#!/usr/bin/env bash
case "$LANG" in
pl*)
DISABLED="Wygaszanie monitora jest WYŁĄCZONE"
ENABLED="Wygaszanie monitora jest WŁĄCZONE"
;;
*)
DISABLED="Monitor blanking is DISABLED"
ENABLED="Monitor blanking is ENABLED"
;;
esac
if (xset q|grep --quiet "DPMS is Enabled");
then
xset s off -dpms
notify-send -i monitor -t 5000 "DPMS" "$DISABLED"
else
xset s on +dpms
notify-send -i monitor -t 5000 "DPMS" "$ENABLED"
fi