Created
July 26, 2022 05:14
-
-
Save 641i130/86a8c2847ff03486c2ed948afb50369d to your computer and use it in GitHub Desktop.
Randomly choose a picture for setting wallpapers on linux
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 | |
# Note that /landscape/ contains any image file name png,jpg,jpeg and is a landscape image and vise versa for portrait | |
# This works in order of monitor ID (DP-0 -> DP-2) in that order | |
feh --bg-fill "$(find /landscape/ -regextype posix-extended -regex '.*\.(png|jpg|jpeg)$' -print0 |shuf -z -n 1)" "$(find /portrait/ -regextype posix-extended -regex '.*\.(png|jpg|jpeg)$' -print0 |shuf -z -n 1)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment