aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/sxiv/exec/key-handler15
-rwxr-xr-x.local/bin/wallpaper.sh5
2 files changed, 17 insertions, 3 deletions
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
new file mode 100755
index 0000000..42b7c1a
--- /dev/null
+++ b/.config/sxiv/exec/key-handler
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+while read file
+do
+ case "$1" in
+ "C-d")
+ mv "$file" ~/.trash ;;
+ "C-r")
+ convert -rotate 90 "$file" "$file" ;;
+ "C-c")
+ echo -n "$file" | xclip -selection clipboard ;;
+ "C-w")
+ echo "$file" && xwallpaper --zoom "$file" ;;
+ esac
+done
diff --git a/.local/bin/wallpaper.sh b/.local/bin/wallpaper.sh
index ed2d2bb..4d52bdb 100755
--- a/.local/bin/wallpaper.sh
+++ b/.local/bin/wallpaper.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-# Launch SXIV and set wallpaper randomly from selected images
+# Launch SXIV in wallpapers dir, C-x-w to set wallpaper
-WALLPAPERS_DIR=~/Pictures/Wallpapers
-xwallpaper --zoom $(sxiv $WALLPAPERS_DIR -t -o | shuf | head -n 1)
+sxiv -t ~/Pictures/Wallpapers