GhostNaN / mpvpaper

A video wallpaper program for wlroots based wayland compositors.
GNU General Public License v3.0
787 stars 24 forks source link

Support for heic dynamic wallpapers #80

Closed Greatz08 closed 1 month ago

Greatz08 commented 1 month ago

heic extension dynamic wallpaper i have seen today only which are for mac i guess. Today i came across this website - https://dynamicwallpaper.club/ and they have pretty awesome dynamic wallpapers which i dont is possible or not to add support for in this project but still sharing so maybe you can think about this.

GhostNaN commented 1 month ago

mpvpaper is just a simple wrapper for mpv. Whatever mpv can display, mpvpaper can only display it as a wallpaper. If mpv cannot run this file type, there is nothing I can do.

Any form of "dynamic wallpaper" would have to be manually scripted through the mpv command interface. https://mpv.io/manual/master/#command-interface The only automation I added was the --slideshow option if that helps. I also made an example script some time ago that probed if a laptop is charging. You can use this to get an idea of something you could make yourself.

#!/bin/bash

MPV_SOCKET_PATH="/tmp/mpv-socket"

mpvpaper -o "input-ipc-server=$MPV_SOCKET_PATH" '*' /home/anon/Videos/wallpapers &

while pidof mpvpaper >/dev/null; do
    bat_state=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state | awk '{print $2}')

    if [ "$bat_state" = "fully-charged" ] || [ "$bat_state" = "charging" ]; then
        echo 'set pause no' | socat - $MPV_SOCKET_PATH
    elif [ "$bat_state" = "discharging" ]; then
        echo 'set pause yes' | socat - $MPV_SOCKET_PATH
    fi

    sleep 5
done

With that said, I'm closing the issue.