- Relocate themes to assets/themes/ and update all references. - Implement custom SDDM theme and Plymouth theme enhancements. - Add themed templates for Alacritty, Hyprland, Waybar, and other apps. - Introduce Makima key remapper module and configuration. - Add Voxtype and Walker configurations. - Implement systemd power management and timeout optimizations. - Add Nautilus-python extensions for LocalSend. - Update branding assets and ASCII art integration.
39 lines
993 B
Bash
Executable File
39 lines
993 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 Nnomarchy NixOS.
|
|
|
|
font_name="$1"
|
|
|
|
if [[ -z $font_name ]]; then
|
|
echo "Usage: nnomarchy-font-set <font-name>"
|
|
exit 1
|
|
fi
|
|
|
|
STATE_DIR="$HOME/.config/home-manager"
|
|
STATE_FILE="$STATE_DIR/state.json"
|
|
|
|
mkdir -p "$STATE_DIR"
|
|
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
|
|
|
if fc-list | grep -iq "$font_name"; then
|
|
TMP_JSON=$(mktemp)
|
|
jq ".font = \"$font_name\"" "$STATE_FILE" > "$TMP_JSON" && mv "$TMP_JSON" "$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
|
|
|
|
nnomarchy-hook font-set "$font_name"
|
|
else
|
|
echo "Font '$font_name' not found."
|
|
exit 1
|
|
fi
|