diff options
| author | marcellus <msimon_fr@hotmail.com> | 2023-04-26 14:51:54 +0200 |
|---|---|---|
| committer | marcellus <msimon_fr@hotmail.com> | 2023-04-26 15:00:27 +0200 |
| commit | f4960863d3aa0604490e7ee758d8725f029c3805 (patch) | |
| tree | 9681946e1feb48b8010c81c4252f58c09eced870 /scripts/randwp | |
| parent | b0ae0d055deac58ff601ff03bb9338efe547e064 (diff) | |
fix: patched the PATH, added a wallpaper, added dwmblocks config file
Diffstat (limited to 'scripts/randwp')
| -rwxr-xr-x | scripts/randwp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/randwp b/scripts/randwp new file mode 100755 index 0000000..a63271d --- /dev/null +++ b/scripts/randwp @@ -0,0 +1,20 @@ +#!/bin/sh +# set a random wallpaper +# to ignore a folder or a file put it in IGNORE like "file1|folder|file2" + +WPDIR="${1:-/home/marcellus/.config/wallpapers}" +ALL="$(find "$WPDIR" -type f ! -path '*/.git*' ! -name 'README.md')" + +searchwp() { + wp="$(printf '%s' "$ALL" | shuf -n 1)" +} + +# 1 screen with hsetroot +#searchwp +#hsetroot -cover "$wp" 1>/dev/null + +# multiple screens with xwallpaper +for output in $(xrandr | awk '$2=="connected" {print $1 "\n"}'); do + searchwp + xwallpaper --output "$output" --zoom "$wp" +done |
