#!/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 "DPMS Disabled" --no-buttons --sticky --on-top
else
xset dpms
yad --timeout 1 --text "DPMS Enabled" --no-buttons --sticky --on-top
fi