diff --git a/Bin/colors-apply.sh b/Bin/colors-apply.sh index 12ae87f9..66e48f6d 100755 --- a/Bin/colors-apply.sh +++ b/Bin/colors-apply.sh @@ -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." \ No newline at end of file +echo "✅ Command sent for $APP_NAME." diff --git a/Modules/Settings/Tabs/ColorSchemeTab.qml b/Modules/Settings/Tabs/ColorSchemeTab.qml index e94d5870..bf7e02a0 100644 --- a/Modules/Settings/Tabs/ColorSchemeTab.qml +++ b/Modules/Settings/Tabs/ColorSchemeTab.qml @@ -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" })