Skip to content

Instantly share code, notes, and snippets.

@waicool20
Last active July 24, 2017 05:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waicool20/9ce9216c028c7d2ce15425b2ec0d5ffd to your computer and use it in GitHub Desktop.
Save waicool20/9ce9216c028c7d2ce15425b2ec0d5ffd to your computer and use it in GitHub Desktop.
Animated Wallpapers on Linux
#!/usr/bin/env bash
file=$(basename "$1")
ext=${file##*.}
if [ $ext == "gif" ]; then
nohup gifview --title "Gifview Wallpaper" --no-interactive -a "$1" >/dev/null 2>&1 &
else
# No Hardware Acceleration
nohup mpv "$1" --no-audio --loop --no-input-default-bindings --no-osc --title="MPV Wallpaper" >/dev/null 2>&1 &
# With Hardware Accleration ( Less CPU ) Change as needed
#nohup mpv "$1" --no-audio --loop --no-input-default-bindings --no-osc --title="MPV Wallpaper" --hwdec=vaapi --vo=opengl >/dev/null 2>&1 &
fi
( if
( begin
( contains ( application_name ) "Gifview Wallpaper" )
)
( begin
( maximize )
( wintype "desktop" )
( stick )
( geometry "+0+0" )
( println "match" )
)
)
( if
( begin
( contains ( application_name ) "MPV Wallpaper" )
)
( begin
( undecorate )
( maximize )
( wintype "desktop" )
( stick )
( below )
( println "match" )
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment