Skip to content

Commit ea80510

Browse files
authored
Merge branch 'noctalia-dev:main' into main
2 parents 58d5c3a + 5d03bf3 commit ea80510

4 files changed

Lines changed: 139 additions & 1 deletion

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Noctalia Starship Palette (predefined colorscheme)
2+
# Generated by Noctalia - do not edit manually
3+
4+
[palettes.noctalia]
5+
# Standard colors
6+
blue = "{{colors.terminal_normal_blue.default.hex}}"
7+
red = "{{colors.terminal_normal_red.default.hex}}"
8+
green = "{{colors.terminal_normal_green.default.hex}}"
9+
yellow = "{{colors.terminal_normal_yellow.default.hex}}"
10+
cyan = "{{colors.terminal_normal_cyan.default.hex}}"
11+
magenta = "{{colors.terminal_normal_magenta.default.hex}}"
12+
white = "{{colors.terminal_normal_white.default.hex}}"
13+
black = "{{colors.terminal_normal_black.default.hex}}"
14+
15+
# Extended palette (Catppuccin-compatible names)
16+
rosewater = "{{colors.terminal_bright_yellow.default.hex}}"
17+
flamingo = "{{colors.terminal_bright_red.default.hex}}"
18+
pink = "{{colors.terminal_bright_magenta.default.hex}}"
19+
mauve = "{{colors.terminal_normal_magenta.default.hex}}"
20+
maroon = "{{colors.terminal_bright_red.default.hex}}"
21+
peach = "{{colors.terminal_bright_yellow.default.hex}}"
22+
teal = "{{colors.terminal_normal_cyan.default.hex}}"
23+
sky = "{{colors.terminal_bright_cyan.default.hex}}"
24+
sapphire = "{{colors.terminal_bright_blue.default.hex}}"
25+
lavender = "{{colors.terminal_bright_magenta.default.hex}}"
26+
27+
# Text shades
28+
text = "{{colors.terminal_foreground.default.hex}}"
29+
subtext1 = "{{colors.terminal_normal_white.default.hex}}"
30+
subtext0 = "{{colors.terminal_bright_black.default.hex}}"
31+
32+
# Surface shades
33+
overlay2 = "{{colors.terminal_bright_black.default.hex}}"
34+
overlay1 = "{{colors.terminal_bright_black.default.hex}}"
35+
overlay0 = "{{colors.terminal_normal_black.default.hex}}"
36+
surface2 = "{{colors.terminal_normal_black.default.hex}}"
37+
surface1 = "{{colors.terminal_normal_black.default.hex}}"
38+
surface0 = "{{colors.terminal_background.default.hex}}"
39+
base = "{{colors.terminal_background.default.hex}}"
40+
mantle = "{{colors.terminal_background.default.hex}}"
41+
crust = "{{colors.terminal_background.default.hex}}"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Noctalia Starship Palette (wallpaper-based)
2+
# Generated by Noctalia - do not edit manually
3+
4+
[palettes.noctalia]
5+
# Standard colors
6+
blue = "{{colors.primary.default.hex}}"
7+
red = "{{colors.error.default.hex}}"
8+
green = "{{colors.secondary.default.hex}}"
9+
yellow = "{{colors.tertiary.default.hex}}"
10+
cyan = "{{colors.secondary_fixed_dim.default.hex}}"
11+
magenta = "{{colors.primary_fixed_dim.default.hex}}"
12+
white = "{{colors.on_surface.default.hex}}"
13+
black = "{{colors.surface.default.hex}}"
14+
15+
# Extended palette (Catppuccin-compatible names)
16+
rosewater = "{{colors.tertiary.default.hex}}"
17+
flamingo = "{{colors.tertiary_fixed_dim.default.hex}}"
18+
pink = "{{colors.primary_fixed_dim.default.hex}}"
19+
mauve = "{{colors.inverse_primary.default.hex}}"
20+
maroon = "{{colors.error.default.hex}}"
21+
peach = "{{colors.tertiary_fixed_dim.default.hex}}"
22+
teal = "{{colors.secondary.default.hex}}"
23+
sky = "{{colors.secondary_fixed_dim.default.hex}}"
24+
sapphire = "{{colors.secondary_fixed_dim.default.hex}}"
25+
lavender = "{{colors.inverse_primary.default.hex}}"
26+
27+
# Text shades
28+
text = "{{colors.on_surface.default.hex}}"
29+
subtext1 = "{{colors.on_surface_variant.default.hex}}"
30+
subtext0 = "{{colors.outline.default.hex}}"
31+
32+
# Surface shades
33+
overlay2 = "{{colors.outline.default.hex}}"
34+
overlay1 = "{{colors.on_surface_variant.default.hex}}"
35+
overlay0 = "{{colors.surface_variant.default.hex}}"
36+
surface2 = "{{colors.surface_variant.default.hex}}"
37+
surface1 = "{{colors.surface.default.hex}}"
38+
surface0 = "{{colors.background.default.hex}}"
39+
base = "{{colors.background.default.hex}}"
40+
mantle = "{{colors.surface.default.hex}}"
41+
crust = "{{colors.on_tertiary.default.hex}}"

Scripts/bash/template-apply.sh

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if [ "$#" -lt 1 ]; then
55
# Print usage information to standard error.
66
echo "Error: No application specified." >&2
7-
echo "Usage: $0 {kitty|ghostty|foot|alacritty|wezterm|fuzzel|walker|pywalfox|cava|yazi|labwc|niri|hyprland|sway|scroll|mango|btop|zathura} [dark|light]" >&2
7+
echo "Usage: $0 {kitty|ghostty|foot|alacritty|wezterm|starship|fuzzel|walker|pywalfox|cava|yazi|labwc|niri|hyprland|sway|scroll|mango|btop|zathura} [dark|light]" >&2
88
exit 1
99
fi
1010

@@ -534,6 +534,54 @@ zathura)
534534
done
535535
;;
536536

537+
starship)
538+
PALETTE_FILE="$HOME/.cache/noctalia/starship-palette.toml"
539+
CONFIG_FILE="$HOME/.config/starship.toml"
540+
541+
# Check if the generated palette file exists
542+
if [ ! -f "$PALETTE_FILE" ]; then
543+
echo "Error: Starship palette file not found at $PALETTE_FILE" >&2
544+
exit 1
545+
fi
546+
547+
MARKER_BEGIN="# >>> NOCTALIA STARSHIP PALETTE >>>"
548+
MARKER_END="# <<< NOCTALIA STARSHIP PALETTE <<<"
549+
550+
# Create config file if it doesn't exist
551+
if [ ! -f "$CONFIG_FILE" ]; then
552+
mkdir -p "$(dirname "$CONFIG_FILE")"
553+
echo 'palette = "noctalia"' > "$CONFIG_FILE"
554+
echo "" >> "$CONFIG_FILE"
555+
echo "$MARKER_BEGIN" >> "$CONFIG_FILE"
556+
cat "$PALETTE_FILE" >> "$CONFIG_FILE"
557+
echo "$MARKER_END" >> "$CONFIG_FILE"
558+
exit 0
559+
fi
560+
561+
# 1. Set palette = "noctalia" at top level
562+
if grep -qE '^palette\s*=' "$CONFIG_FILE"; then
563+
sed -i -E 's/^palette\s*=.*/palette = "noctalia"/' "$CONFIG_FILE"
564+
else
565+
# Insert after schema line if present, otherwise at line 1
566+
if grep -qE '^\"\$schema\"' "$CONFIG_FILE"; then
567+
sed -i '/^\"\$schema\"/a palette = "noctalia"' "$CONFIG_FILE"
568+
else
569+
sed -i '1i palette = "noctalia"' "$CONFIG_FILE"
570+
fi
571+
fi
572+
573+
# 2. Remove existing noctalia palette block (between markers)
574+
if grep -qF "$MARKER_BEGIN" "$CONFIG_FILE"; then
575+
sed -i "/$(echo "$MARKER_BEGIN" | sed 's/[[\.*^$()+?{|]/\\&/g')/,/$(echo "$MARKER_END" | sed 's/[[\.*^$()+?{|]/\\&/g')/d" "$CONFIG_FILE"
576+
fi
577+
578+
# 3. Append the new palette block
579+
echo "" >> "$CONFIG_FILE"
580+
echo "$MARKER_BEGIN" >> "$CONFIG_FILE"
581+
cat "$PALETTE_FILE" >> "$CONFIG_FILE"
582+
echo "$MARKER_END" >> "$CONFIG_FILE"
583+
;;
584+
537585
*)
538586
# Handle unknown application names.
539587
echo "Error: Unknown application '$APP_NAME'." >&2

Services/Theming/TemplateRegistry.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ Singleton {
6464
"predefinedTemplatePath": "terminal/wezterm-predefined.toml",
6565
"outputPath": "~/.config/wezterm/colors/Noctalia.toml",
6666
"postHook": `${templateApplyScript} wezterm`
67+
},
68+
{
69+
"id": "starship",
70+
"name": "Starship",
71+
"templatePath": "terminal/starship.toml",
72+
"predefinedTemplatePath": "terminal/starship-predefined.toml",
73+
"outputPath": "~/.cache/noctalia/starship-palette.toml",
74+
"postHook": `${templateApplyScript} starship`
6775
}
6876
]
6977

0 commit comments

Comments
 (0)