You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kde_screensaver_suspendscreen/event_screensaver

19 lines
377 B
Plaintext

#!/bin/sh
is_screen_locked()
{
if dbus-send --session --dest=org.freedesktop.ScreenSaver --type=method_call --print-reply /org/freedesktop/ScreenSaver org.freedesktop.ScreenSaver.GetActive | grep 'boolean true' > /dev/null; then
return 0
else
return 1
fi
}
# Sleep to timeout
sleep 15
if is_screen_locked; then
# Disable screens
xset dpms force off
fi