Skip to content

1.1 - Saving Resources

Compare
Choose a tag to compare
@GhostNaN GhostNaN released this 05 Dec 14:03
· 67 commits to master since this release

An update inspired by "Wallpaper Engine" to save resources

I hope this allows for more prolonged daily use

What's new:

  • 2 new options "--auto-pause/-p" and "--auto-stop/-s"
  • 2 watch lists "pauselist" and "stoplist"
  • New program called "mpvpaper-holder" to facilitate "stopping" mpvpaper
  • User configs in "~/.config/mpv/" are now loaded
  • mpv terminal mode is enabled by default for better controls
    • set "terminal=no" mpv option if you don't want that
  • Various minor improvements

What's auto, pause, and stop:

  • auto: automagically pause/stop if the wallpaper is *hidden.
  • pause: literally just pauses mpv to save processing power.
  • stop: "suspends" mpvpaper to a separate holder program called "mpvpaper-holder".
    This saves not just processing power, but RAM usage as well.

What's a "pauselist" and "stoplist":

It's a list of user defined programs that, if running, will cause mpvpaper to **pause/stop.

To utilize:

  1. Create a text file in "~/.config/mpvpaper/" with
    the file name "pauselist" and/or "stoplist" respectively.
  2. Add programs that can be found with the "pidof" command into the list.
    Make sure the programs are separated by either spaces or newlines.
    For example: "wine firefox steam"

Notes:

*Limitations of automagic:

There's a feature of Wayland called a "surface frame callback".
With this feature a Wayland compositor can tell mpvpaper to
draw/render only when it makes sense to do so.
And one reason mpvpaper might not draw/render is if it's "hidden".
This is the magic behind the automagic pause/stop options.

But "hidden", at least with Sway, only means if there is a fullscreen window
in the way of the wallpaper. mpvpaper will still draw/render even if there
is a normal window blocking the wallpaper view entirely.

**More on lists:

  • mpvpaper will automatically resume only after all the programs
    in the watch lists are no longer running.
  • If there are programs running from both lists, stopping will always win out.
  • Programs added into a list at runtime will be ignored, unless restarted or "stopped".

Misc points:

  • When mpvpaper is resuming after "stopping", mpvpaper should begin where it left off.
    Both in terms of time position and playlist position(if not shuffled).
  • There is a small time delay(1-2 secs.) with the automagic options
    as it uses time to calculate when to act.