Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion turn-off-monitors
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
function turn-off-screen-in-wayland()
{
echo "Turning off monitors..."
if [[ $XDG_SESSION_DESKTOP == gnome* ]]; then
if [[ $XDG_SESSION_DESKTOP == gnome* || $MUTTER_PROPERTY_SUPPORTED ]]; then
_trigger-monitors-off-in-gnome-wayland

local interaction_event=$(wait_until_mouse_or_keyboard_event)
Expand Down Expand Up @@ -89,6 +89,13 @@ function wait_until_mouse_or_keyboard_event()
}
### END framework/wait_until_mouse_or_keyboard_event.sh

# C
if busctl --user get-property org.gnome.Mutter.DisplayConfig \
/org/gnome/Mutter/DisplayConfig org.gnome.Mutter.DisplayConfig \
PowerSaveMode &>/dev/null; then
MUTTER_PROPERTY_SUPPORTED=true
fi

if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
turn-off-screen-in-wayland
else
Expand Down