Files
omarchy/bin/omarchy-theme-set
Ofir Miller 7e1c88b932 update to use $TERMINAL instead of alacitty (#1648)
* 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>
2025-09-16 14:32:40 +02:00

39 lines
904 B
Bash
Executable File

#!/bin/bash
if [[ -z $1 && $1 != "CNCLD" ]]; then
echo "Usage: omarchy-theme-set <theme-name>"
exit 1
fi
THEMES_DIR="$HOME/.config/omarchy/themes/"
CURRENT_THEME_DIR="$HOME/.config/omarchy/current/theme"
THEME_NAME=$(echo "$1" | sed -E 's/<[^>]+>//g' | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
THEME_PATH="$THEMES_DIR/$THEME_NAME"
# Check if the theme entered exists
if [[ ! -d "$THEME_PATH" ]]; then
echo "Theme '$THEME_NAME' does not exist in $THEMES_DIR"
exit 1
fi
# Update theme symlinks
ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR"
# Change background with theme
omarchy-theme-bg-next
# Restart components to apply new theme
omarchy-restart-waybar
omarchy-restart-swayosd
hyprctl reload
pkill -SIGUSR2 btop
makoctl reload
# Change gnome, browser, vscode themes
omarchy-theme-set-terminal
omarchy-theme-set-gnome
omarchy-theme-set-eza
omarchy-theme-set-browser
omarchy-theme-set-vscode