Files
dotfiles/.i3/scripts/dpmsctl.sh
2019-07-02 21:47:58 +02:00

10 lines
380 B
Bash

#!/bin/sh
STATUS=`xset q | awk '{for (I=1;I<=NF;I++) if ($I == "DPMS" && $(I+1) == "is") {print $(I+2)};}'`
if [ "$STATUS" == "Enabled" ]; then
xset -dpms
yad --timeout 1 --text "<span font=\"20\">DPMS Disabled</span>" --no-buttons --sticky --on-top
else
xset dpms
yad --timeout 1 --text "<span font=\"20\">DPMS Enabled</span>" --no-buttons --sticky --on-top
fi