- Update flake.nix with 25.11 release and core inputs - Add dedicated modules for audio (Pipewire), bluetooth, and networking - Update GEMINI.md with the new Modular Merging Architecture blueprint - Configure graphical installer ISO and test VM outputs
37 lines
867 B
Bash
Executable File
37 lines
867 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Set the system-wide monospace font that should be used by the terminal, hyprlock, waybar, swayosd, etc.
|
|
# Declarative version for Nomarchy NixOS.
|
|
|
|
font_name="$1"
|
|
|
|
if [[ -z $font_name ]]; then
|
|
echo "Usage: nomarchy-font-set <font-name>"
|
|
exit 1
|
|
fi
|
|
|
|
STATE_DIR="$HOME/.config/home-manager"
|
|
STATE_FILE="$STATE_DIR/font-state.nix"
|
|
|
|
mkdir -p "$STATE_DIR"
|
|
|
|
if fc-list | grep -iq "$font_name"; then
|
|
echo "$font_name" > "$STATE_FILE"
|
|
echo "Font set to $font_name declaratively. Applying changes..."
|
|
env-update
|
|
|
|
# Instant feedback for certain apps via IPC
|
|
if pgrep -x kitty; then
|
|
pkill -USR1 kitty
|
|
fi
|
|
if pgrep -x ghostty; then
|
|
pkill -SIGUSR2 ghostty
|
|
notify-send -u low " You must restart Ghostty to see font change"
|
|
fi
|
|
|
|
nomarchy-hook font-set "$font_name"
|
|
else
|
|
echo "Font '$font_name' not found."
|
|
exit 1
|
|
fi
|