Last active
December 19, 2021 16:51
-
-
Save ldotlopez/e5600ea39f76328c24a8f3f6b388c0a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
YT_VIDEO="https://www.youtube.com/watch?v=ydYDqZQpim8" | |
YT_URL="$(youtube-dl --get-url "$YT_VIDEO")" | |
OUTF="$HOME/.local/share/namibia/background.png" | |
mkdir -p "$(dirname -- "$OUTF")" | |
ffmpeg -y -ss 0 -i "$YT_URL" -vframes 1 -q:v 2 "$OUTF" | |
gsettings set org.gnome.desktop.background picture-uri "file://$OUTF" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment