Skip to content

Instantly share code, notes, and snippets.

View Deminder's full-sized avatar

Deminder

  • Germany
View GitHub Profile
@Deminder
Deminder / inhibit-screensaver.lua
Last active June 17, 2023 12:09
Inhibit screensaver: mpv flatpak on GNOME wayland (workaround)
-- ~/.var/app/io.mpv.Mpv/config/mpv/scripts/inhibit-screensaver.lua
--
-- Workaround for inhibiting screensaver for io.mpv.Mpv flatpak (if not paused)
-- Issue: [vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
-- Until this is merged: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/111
-- Non-flatpak version: https://gist.github.com/crazygolem/a7d3a2d3c0cee5d072c0cbbbdee69286
--
-- NOTE: if mpv does not exit cleanly (e.g. with SIGKILL), an orphan process will keep inhibiting the screensaver
--
-- Arch: x86_64