Files
dotfiles/script/omarchy-theme-set-keyboard-f16
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

26 lines
798 B
Bash
Executable File

#!/bin/bash
# omarchy:summary=Apply the current theme keyboard color to Framework Laptop 16 keyboards
# omarchy:hidden=true
FRAMEWORK16_THEME=~/.config/omarchy/current/theme/keyboard.rgb
if omarchy-cmd-present qmk_hid && [[ -f $FRAMEWORK16_THEME ]]; then
hex=$(cat "$FRAMEWORK16_THEME")
hex="${hex#\#}"
# Convert hex to QMK HSV (0-255 scale) using Python's colorsys
read -r h s <<< $(python3 -c "
import colorsys
r, g, b = int('$hex'[:2],16)/255, int('$hex'[2:4],16)/255, int('$hex'[4:6],16)/255
h, s, v = colorsys.rgb_to_hsv(r, g, b)
print(int(h * 255), int(s * 255))
")
qmk_hid via --rgb-effect 1 2>/dev/null
qmk_hid via --rgb-hue "$h" 2>/dev/null
qmk_hid via --rgb-saturation "$s" 2>/dev/null
qmk_hid via --rgb-brightness 100 2>/dev/null
qmk_hid via --save 2>/dev/null
fi