Skip to content

Instantly share code, notes, and snippets.

@ritobanrc
Created September 14, 2020 23:20
Show Gist options
  • Save ritobanrc/b919f88d7771f830162accef75e8fefd to your computer and use it in GitHub Desktop.
Save ritobanrc/b919f88d7771f830162accef75e8fefd to your computer and use it in GitHub Desktop.
My old wallpaper setting script
#!/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