mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-06 04:20:23 +00:00
* update to use $TERMINAL instead of alacitty * revert * move env to hyprconfig * Only set if we have alacritty * Add launcher for wifi settings so it can be used in mako config * Set system terminal in config/uwsm/env to ensure its available everywhere * Ensure that $TERMINAL is available after update * Didn't work to have the TERMINAL env in Hyprland * Configure terminal settings against a full set of options * Make About usable with any terminal * One more alacritty-specific setting * Use the new wifi launcher bin * Only require the update/relaunch if TERMINAL isn't already set in config/uwsm/env * More alacritty usage converted to $TERMINAL * Use new launcher * Change scrolltouchpad input rule to apply to all terminals * Its a singular match * Take current font from waybar, in case we don't have alacritty * Only set font for alacritty if its being used * Get ready to be terminal agnostic on the refresh of config too * Use new launcher * Note the last reliance we have on alacritty * Make theme setting for terminals generic and include kitty * Set font_family for kitty as well * Quiet grep --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
33 lines
1007 B
Bash
Executable File
33 lines
1007 B
Bash
Executable File
#!/bin/bash
|
|
|
|
font_name="$1"
|
|
|
|
if [[ -n "$font_name" && "$font_name" != "CNCLD" ]]; then
|
|
if fc-list | grep -iq "$font_name"; then
|
|
if [[ -f ~/.config/alacritty/alacritty.toml ]]; then
|
|
sed -i "s/family = \".*\"/family = \"$font_name\"/g" ~/.config/alacritty/alacritty.toml
|
|
fi
|
|
|
|
if [[ -f ~/.config/kitty/kitty.conf ]]; then
|
|
sed -i "s/^font_family .*/font_family $font_name/g" ~/.config/kitty/kitty.conf
|
|
pkill -USR1 kitty
|
|
fi
|
|
|
|
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/waybar/style.css
|
|
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/swayosd/style.css
|
|
xmlstarlet ed -L \
|
|
-u '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/string' \
|
|
-v "$font_name" \
|
|
~/.config/fontconfig/fonts.conf
|
|
|
|
omarchy-restart-waybar
|
|
omarchy-restart-swayosd
|
|
omarchy-restart-walker
|
|
else
|
|
echo "Font '$font_name' not found."
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "Usage: omarchy-font-set <font-name>"
|
|
fi
|