summaryrefslogtreecommitdiff
path: root/arch/scripts
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
Initial commit.
Diffstat (limited to 'arch/scripts')
-rwxr-xr-xarch/scripts/.local/bin/launcher26
-rwxr-xr-xarch/scripts/.local/bin/pick-wallpaper11
-rwxr-xr-xarch/scripts/.local/bin/set-wallpaper27
3 files changed, 64 insertions, 0 deletions
diff --git a/arch/scripts/.local/bin/launcher b/arch/scripts/.local/bin/launcher
new file mode 100755
index 0000000..9451d35
--- /dev/null
+++ b/arch/scripts/.local/bin/launcher
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+# Application launcher using bemenu — colors sourced from wallust cache
+
+FONT="JetBrainsMono Nerd Font 12"
+
+# Defaults (used until wallust has run at least once)
+NB="#1e1e2e" NF="#cdd6f4" SB="#89b4fa" SF="#1e1e2e"
+AB="#313244" AF="#cdd6f4" TB="#1e1e2e" TF="#89b4fa"
+FB="#1e1e2e" FF="#cdd6f4"
+
+[ -f ~/.cache/wallust/launcher-colors.sh ] && source ~/.cache/wallust/launcher-colors.sh
+
+bemenu-run \
+ --fn "$FONT" \
+ --nb "$NB" \
+ --nf "$NF" \
+ --sb "$SB" \
+ --sf "$SF" \
+ --ab "$AB" \
+ --af "$AF" \
+ --tb "$TB" \
+ --tf "$TF" \
+ --fb "$FB" \
+ --ff "$FF" \
+ --list 10 \
+ --prompt " "
diff --git a/arch/scripts/.local/bin/pick-wallpaper b/arch/scripts/.local/bin/pick-wallpaper
new file mode 100755
index 0000000..c96ca4e
--- /dev/null
+++ b/arch/scripts/.local/bin/pick-wallpaper
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+WALLPAPER_DIR="${HOME}/wallpapers"
+
+selected=$(find "$WALLPAPER_DIR" -type f \( \
+ -name "*.jpg" -o -name "*.jpeg" -o \
+ -name "*.png" -o -name "*.webp" \) | sort | \
+ fzf --preview 'chafa --size=80x40 {}' \
+ --preview-window 'right:60%' \
+ --prompt "wallpaper> ")
+
+[ -n "$selected" ] && ~/.local/bin/set-wallpaper "$selected"
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