Created
September 14, 2020 23:20
-
-
Save ritobanrc/b919f88d7771f830162accef75e8fefd to your computer and use it in GitHub Desktop.
My old wallpaper setting script
This file contains 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 | |
[ -f "$2" ] && cp "$2" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." | |
[ -d "$2" ] && cp "$(find "$2" -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." | |
xwallpaper --zoom ~/.config/wall.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment