aboutsummaryrefslogtreecommitdiff
path: root/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts')
-rwxr-xr-xScripts/.config/Scripts/setbg21
-rwxr-xr-xScripts/.config/Scripts/wp4
2 files changed, 25 insertions, 0 deletions
diff --git a/Scripts/.config/Scripts/setbg b/Scripts/.config/Scripts/setbg
new file mode 100755
index 0000000..2487072
--- /dev/null
+++ b/Scripts/.config/Scripts/setbg
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# if given an argument, moves it there. This script without an
+# argument sets ~/.config/wall.png as the wallpaper, which is required on login
+# if you don't want a black screen.
+#
+# You may also give a directory name to select a random image from that
+# directory as a wallpaper. Be careful that the directory only has images.
+
+
+WALLPAPER_HOME="$HOME/Pictures/plasma_wal_hack"
+
+[ -f "$1" ] && rm -f $WALLPAPER_HOME/* && cp "$1" "$WALLPAPER_HOME" && notify-send -i "$WALLPAPER_HOME/$1" "Wallpaper changed."
+
+[ -d "$1" ] && rm -f $WALLPAPER_HOME/* && cp "$(find "$1" -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -type f | shuf -n 1)" "$WALLPAPER_HOME" && notify-send -i "$WALLPAPER_HOME/$1" "Random Wallpaper chosen."
+
+# If pywal is installed, use it.
+type wal >/dev/null 2>&1 && { wal -c
+ wal -i "$WALLPAPER_HOME/$i" -n
+ xsetroot -name "fsignal:xrdb" & } >/dev/null 2>&1
+
diff --git a/Scripts/.config/Scripts/wp b/Scripts/.config/Scripts/wp
new file mode 100755
index 0000000..e36b9e0
--- /dev/null
+++ b/Scripts/.config/Scripts/wp
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+find $HOME/Pictures/wallpapers -type f | shuf | sxiv -
+