10 lines
380 B
Bash
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
|