Files
dotfiles/script/omarchy-theme-set-foot
T
gitadmin fb52016257 feat: add omarchy theme template system with management scripts
- New default/themed/ templates (alacritty, btop, foot, ghostty, helix,
  hyprland, hyprlock, kitty, mako, obsidian, rofi, swayosd, tmux,
  walker, waybar, keyboard.rgb, gum.env, etc.)
- Add omarchy-* theme management scripts (install, refresh, set, remove,
  update, bg-set, colors-from-alacritty, current, etc.)
- Add omarchy restart/hook scripts (btop, hyprctl, hypridle, mako, tmux)
- Add installer/environment.sh for shared env vars
- Add 19 theme directories with colors.toml, vscode.json, backgrounds,
  and app-specific configs (catppuccin, everforest, gruvbox, nord,
  tokyo-night, rose-pine, etc.)
- Update bing-wallpaper script to use new .config/omarchy path
2026-07-08 15:31:04 -04:00

29 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# omarchy:summary=Apply current Omarchy theme colors to running Foot terminals
# omarchy:hidden=true
foot_theme=~/.config/omarchy/current/theme/foot.ini
if [[ ! -f $foot_theme ]] || ! pgrep -x foot >/dev/null; then
exit 0
fi
foot_osc=$(awk -F= '
function color(value) { return "#" value }
/^foreground=/ { printf "\033]10;%s\007", color($2) }
/^background=/ { printf "\033]11;%s\007", color($2) }
/^cursor=/ { split($2, parts, " "); printf "\033]12;%s\007", color(parts[2]) }
/^selection-background=/ { printf "\033]17;%s\007", color($2) }
/^selection-foreground=/ { printf "\033]19;%s\007", color($2) }
/^regular[0-7]=/ { split($1, parts, "regular"); printf "\033]4;%d;%s\007", parts[2], color($2) }
/^bright[0-7]=/ { split($1, parts, "bright"); printf "\033]4;%d;%s\007", parts[2] + 8, color($2) }
' "$foot_theme")
for foot_pid in $(pgrep -x foot); do
for child_pid in $(pgrep -P "$foot_pid"); do
tty=$(readlink "/proc/$child_pid/fd/1" 2>/dev/null)
[[ $tty == /dev/pts/* ]] && printf '%b' "$foot_osc" >"$tty"
done
done