summaryrefslogtreecommitdiff
path: root/arch/scripts/.local/bin/set-wallpaper
diff options
context:
space:
mode:
authorsteven-na <noreply.github@stvnc.dev>2026-04-26 11:58:32 -0700
committersteven-na <noreply.github@stvnc.dev>2026-04-26 11:58:32 -0700
commit4b309f0a5555b5fed5a65ee425dcb6da15421f5b (patch)
treeb923f4f76df6205ee3099d9bf8072209ff9e8256 /arch/scripts/.local/bin/set-wallpaper
Initial commit.
Diffstat (limited to 'arch/scripts/.local/bin/set-wallpaper')
-rwxr-xr-xarch/scripts/.local/bin/set-wallpaper27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/scripts/.local/bin/set-wallpaper b/arch/scripts/.local/bin/set-wallpaper
new file mode 100755
index 0000000..30b15d8
--- /dev/null
+++ b/arch/scripts/.local/bin/set-wallpaper
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+set -euo pipefail
+WALLPAPER="${1:?usage: set-wallpaper <path>}"
+
+awww img "$WALLPAPER" \
+ --transition-type wipe \
+ --transition-angle 30 \
+ --transition-duration 1
+
+wallust run "$WALLPAPER" --ignore-sequence background --ignore-sequence foreground
+
+gdbus call --session \
+ --dest com.mitchellh.ghostty \
+ --object-path /com/mitchellh/ghostty \
+ --method org.gtk.Actions.Activate \
+ "reload-config" "[]" "{}" > /dev/null 2>&1 || true
+
+hyprctl reload
+pkill -x mako || true
+mako &
+eww reload || true
+
+# spicetify watch -s picks up color.ini changes automatically.
+# Fallback: refresh manually if watch isn't running.
+pgrep -f "spicetify watch" > /dev/null || spicetify refresh > /dev/null 2>&1 || true
+
+# nvim picks up the new palette automatically via a libuv file watcher in colorscheme.lua