First try at colors-apply.sh

This commit is contained in:
Corey Woodworth
2025-11-01 20:24:00 -04:00
parent 9be50c10e2
commit 51cc3b6c57
2 changed files with 31 additions and 3 deletions
+30 -2
View File
@@ -5,7 +5,7 @@
if [ "$#" -ne 1 ]; then
# Print usage information to standard error.
echo "Error: No application specified." >&2
echo "Usage: $0 {kitty|ghostty|foot|alacritty|fuzzel|walker|pywalfox}" >&2
echo "Usage: $0 {kitty|ghostty|foot|alacritty|wezterm|fuzzel|walker|pywalfox}" >&2
exit 1
fi
@@ -103,6 +103,34 @@ EOF
fi
;;
wezterm)
echo "🎨 Applying 'noctalia' theme to wezterm..."
CONFIG_FILE="$HOME/.config/wezterm/wezterm.lua"
# might need this, not sure yet.
THEME_FILE="$HOME/.config/wezterm/colors/noctalia.toml"
# Check if the config file exists.
if [ -f "$CONFIG_FILE" ]; then
# Check if theme is already set
if grep -q '^\s*config\.color_scheme\s*=\s*["']noctalia["']' "$CONFIG_FILE"; then
echo "Theme already set to noctalia, skipping modification."
else
# Check if config.color_scheme line exists
if grep -q '^\s*config\.color_scheme\s*=' "$CONFIG_FILE"; then
# Needs to replace config.color_scheme line with config.color_scheme = "Noctalia"
sed -i 's/^\(\s*config\.color_scheme\s*=\s*\).*$/\1'"'"'noctalia'"'"'/' "$CONFIG_FILE"
else
# No color_scheme added yet.
# Just needs to add config.color_scheme = "Noctalia" somewhere after local config = wezterm.config_builder() and before the return config line
sed -i '/^\s*return\s*config/i config.color_scheme = '"'"'noctalia'"'"'\n' "$CONFIG_FILE"
fi
fi
else
echo "Error: wezterm config file not found at $CONFIG_FILE" >&2
exit 1
fi
;;
fuzzel)
echo "🎨 Applying 'noctalia' theme to fuzzel..."
CONFIG_FILE="$HOME/.config/fuzzel/fuzzel.ini"
@@ -171,4 +199,4 @@ EOF
;;
esac
echo "✅ Command sent for $APP_NAME."
echo "✅ Command sent for $APP_NAME."
+1 -1
View File
@@ -600,7 +600,7 @@ ColumnLayout {
NCheckbox {
label: "Wezterm"
description: ProgramCheckerService.weztermAvailable ? I18n.tr("settings.color-scheme.templates.terminal.wezterm.description", {
"filepath": "~/.config/wezterm/colors/Noctalia.toml"
"filepath": "~/.config/wezterm/colors/noctalia.toml"
}) : I18n.tr("settings.color-scheme.templates.terminal.wezterm.description-missing", {
"app": "wezterm"
})