summaryrefslogtreecommitdiffstats
path: root/.local/bin/set_wallpaper
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2025-02-13 14:13:49 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2025-02-13 14:13:49 +0530
commit8a2e1006b3b272126332aa064f3ad95387129544 (patch)
tree944c80ac612a65980d94a54ba11b6c7102037ecf /.local/bin/set_wallpaper
parentdcbb16d8b08ff5956abef5e6478b59df2e93ad35 (diff)
downloaddotfiles-8a2e1006b3b272126332aa064f3ad95387129544.tar.gz
dotfiles-8a2e1006b3b272126332aa064f3ad95387129544.tar.bz2
dotfiles-8a2e1006b3b272126332aa064f3ad95387129544.zip
new dot filesHEADmaster
Diffstat (limited to '.local/bin/set_wallpaper')
-rwxr-xr-x.local/bin/set_wallpaper21
1 files changed, 21 insertions, 0 deletions
diff --git a/.local/bin/set_wallpaper b/.local/bin/set_wallpaper
new file mode 100755
index 0000000..38dc3c7
--- /dev/null
+++ b/.local/bin/set_wallpaper
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Dependencies:
+# convert wal xdotool xwallpaper
+
+wall_dir=~/pix/wall
+
+if [ -z "$1" ]; then
+ wall="$(find "$wall_dir" -type f -name "*.jpg" -o -name "*.png" | shuf -n1)"
+else
+ wall="$1"
+fi
+
+convert "$wall" ~/.local/share/bg.jpg
+xwallpaper --zoom ~/.local/share/bg.jpg
+wal -c
+wal -i ~/.local/share/bg.jpg
+xdotool key super+F5
+pywalfox update
+wal-telegram -w
+pywal-discord -t biswa