diff options
Diffstat (limited to 'arch/scripts')
| -rwxr-xr-x | arch/scripts/.local/bin/launcher | 26 | ||||
| -rwxr-xr-x | arch/scripts/.local/bin/pick-wallpaper | 11 | ||||
| -rwxr-xr-x | arch/scripts/.local/bin/set-wallpaper | 27 |
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 |