Commit 57ed6ef9 authored by Guido Gunther's avatar Guido Gunther Committed by Sebastian Krzyszkowiak

helpers: Add script to check screen saver state

Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 24517c4e
Pipeline #27099 passed with stages
in 5 minutes and 30 seconds
#!/bin/sh
set -e
if [ -z "$1" ]; then
gdbus call --session --dest org.gnome.ScreenSaver --object-path /org/gnome/ScreenSaver --method org.gnome.ScreenSaver.GetActive
else
case "$1" in
on|1|ON)
gdbus call --session --dest org.gnome.ScreenSaver --object-path /org/gnome/ScreenSaver --method org.gnome.ScreenSaver.Lock
;;
*)
echo "Unknown state"
;;
esac
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment