aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsetRandomBG.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/setRandomBG.sh b/setRandomBG.sh
index 1bba002..d7c5669 100755
--- a/setRandomBG.sh
+++ b/setRandomBG.sh
@@ -1,8 +1,10 @@
#!/bin/sh
-# Sets a random image as wallpaper.
+# Sets a random image as wallpaper and soft-links it from home folder.
bgsFolder="$CONFIG_FOLDER_RANDOMBG"
[ -z "$bgsFolder" ] && dunstify '$CONFIG_FOLDER_RANDOMBG env variable not set.' && exit 0
[ ! -d "$bgsFolder" ] && dunstify "'$CONFIG_FOLDER_RANDOMBG' folder does not exist." && exit 0
-feh --bg-max "$(ls -d "$CONFIG_FOLDER_RANDOMBG"/* | shuf -n 1)"
+wpFile="$(ls -d "$CONFIG_FOLDER_RANDOMBG"/* | shuf -n 1)"
+feh --bg-max "$wpFile"
+ln -sf "$wpFile" "${HOME}/wp"