~anteater/mpv-inhibit-suspend

mpv plugin to prevent system sleep during playback
fork into mpv-inhibit-suspend
f1482350 — Doron Behar 4 years ago
Makefile: Enable specifying a SCRIPTS_DIR
a95d2a50 — Ho-Yon Mak 4 years ago
youtube thumbnails as mpris:artUrl

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~anteater/mpv-inhibit-suspend
read/write
git@git.sr.ht:~anteater/mpv-inhibit-suspend

You can also use your local clone with git send-email.

#mpv-inhibit-suspend

mpv-inhibit-suspend is a plugin for mpv that prevents the system from suspending while media is playing, using the org.gnome.SessionManager DBus protocol supported by Phosh and other Mutter-based sessions. It is derived from the very useful mpv-mpris plugin and is recommended to be used in tandem. It's especially convenient for platforms like pinephones, the Librem 5, and postmarketOS devices, which suspend aggressively to save power.

#Build

Build requirements:

  • C99 compiler (gcc or clang)
  • pkg-config
  • mpv development files
  • glib development files
  • gio development files

Building should be as simple as running make in the cloned directory.

#Install

To install either run make install or copy the compiled inhibit-suspend.so file into one of the following directories:

  • /etc/mpv/scripts
  • ~/.config/mpv/scripts

The plugin can be used without installing by running mpv with the --script flag:

mpv --script=/path/to/inhibit-suspend.so video.mp4

#Notes

This plugin requires mpv to be built with --enable-cplugins (default as of mpv 0.26) and to be built with Lua support (to enable loading scripts).

Do not follow this link