From bc71f99c581c318367aa0a7f67f7a383bb86248a Mon Sep 17 00:00:00 2001 From: Lachlan Donald Date: Thu, 30 Oct 2025 15:08:04 +1100 Subject: [PATCH] feat: set nord-night theme for helix and ghostty --- Brewfile | 1 + ghostty/config | 3 ++- ghostty/install.sh | 29 +++++++++++++++++++++++------ ghostty/themes/nord-night | 24 ++++++++++++++++++++++++ helix/config.toml | 31 +++++++++++++++++++++++++++++++ helix/install.sh | 11 +++++++++++ 6 files changed, 92 insertions(+), 7 deletions(-) create mode 100644 ghostty/themes/nord-night create mode 100644 helix/config.toml create mode 100755 helix/install.sh diff --git a/Brewfile b/Brewfile index 9417f8f..bc87a84 100644 --- a/Brewfile +++ b/Brewfile @@ -21,6 +21,7 @@ brew 'kubecolor' tap 'go-task/tap' brew 'go-task/tap/go-task' +brew 'helix' brew 'awscli' brew 'pv' brew 'wget' diff --git a/ghostty/config b/ghostty/config index 793f638..9194e2e 100644 --- a/ghostty/config +++ b/ghostty/config @@ -2,7 +2,7 @@ # https://ghostty.org/docs/config # Font configuration -font-family = "Menlo" +font-family = "Berkeley Mono" font-size = 13 # Window appearance @@ -10,6 +10,7 @@ window-padding-x = 10 window-padding-y = 10 macos-option-as-alt = true background-opacity = 1.0 +theme = "nord-night" # Basic behavior shell-integration = "detect" diff --git a/ghostty/install.sh b/ghostty/install.sh index fab4c4d..1a051de 100755 --- a/ghostty/install.sh +++ b/ghostty/install.sh @@ -1,9 +1,26 @@ -#! /bin/bash +#!/bin/bash +set -euo pipefail -# Create the config directory if it doesn't exist -mkdir -p "$HOME/Library/Application Support/com.mitchellh.ghostty" +CONFIG_DIR="$HOME/Library/Application Support/com.mitchellh.ghostty" +XDG_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/ghostty" +THEMES_SRC_DIR="$DOTFILES/ghostty/themes" -# Symlink the config file -ln -sf "$DOTFILES/ghostty/config" "$HOME/Library/Application Support/com.mitchellh.ghostty/config" +mkdir -p "$CONFIG_DIR" "$XDG_CONFIG_DIR" -echo "Ghostty config symlinked to $HOME/Library/Application Support/com.mitchellh.ghostty/config" +ln -sf "$DOTFILES/ghostty/config" "$CONFIG_DIR/config" +ln -sf "$DOTFILES/ghostty/config" "$XDG_CONFIG_DIR/config" + +link_themes() { + local destination="$1" + mkdir -p "$destination" + if [ -d "$THEMES_SRC_DIR" ]; then + find "$THEMES_SRC_DIR" -mindepth 1 -maxdepth 1 -type f -print0 | while IFS= read -r -d '' theme; do + ln -sf "$theme" "$destination/$(basename "$theme")" + done + fi +} + +link_themes "$CONFIG_DIR/themes" +link_themes "$XDG_CONFIG_DIR/themes" + +echo "Ghostty config and themes linked under $CONFIG_DIR and $XDG_CONFIG_DIR" diff --git a/ghostty/themes/nord-night b/ghostty/themes/nord-night new file mode 100644 index 0000000..19586aa --- /dev/null +++ b/ghostty/themes/nord-night @@ -0,0 +1,24 @@ +# Nord Night palette adapted for Ghostty +background = #252933 +foreground = #c0c5cf +selection-foreground = #4c566a +selection-background = #eceff4 +cursor-color = #eceff4 +cursor-text = #252933 + +palette = 0=#3b4252 +palette = 1=#bf616a +palette = 2=#a3be8c +palette = 3=#ebcb8b +palette = 4=#81a1c1 +palette = 5=#b48ead +palette = 6=#88c0d0 +palette = 7=#e5e9f0 +palette = 8=#596377 +palette = 9=#bf616a +palette = 10=#a3be8c +palette = 11=#ebcb8b +palette = 12=#81a1c1 +palette = 13=#b48ead +palette = 14=#8fbcbb +palette = 15=#eceff4 diff --git a/helix/config.toml b/helix/config.toml new file mode 100644 index 0000000..2f2b376 --- /dev/null +++ b/helix/config.toml @@ -0,0 +1,31 @@ +theme = "nord-night" + +[editor] +line-number = "relative" +cursorline = true +true-color = true +color-modes = true +bufferline = "multiple" +scrolloff = 5 + +[editor.lsp] +display-inlay-hints = true +auto-signature-help = false + +[editor.cursor-shape] +insert = "bar" +normal = "block" +select = "underline" + +[editor.file-picker] +hidden = false +git-ignore = true + +[editor.soft-wrap] +enable = true + +[editor.indent-guides] +render = true + +[keys.insert] +"C-s" = ":w" diff --git a/helix/install.sh b/helix/install.sh new file mode 100755 index 0000000..dd6b255 --- /dev/null +++ b/helix/install.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Install Helix configuration. +set -euo pipefail + +HELIX_CONFIG_DIR="${HOME}/.config/helix" +mkdir -p "${HELIX_CONFIG_DIR}" + +ln -sf "${DOTFILES}/helix/config.toml" "${HELIX_CONFIG_DIR}/config.toml" + +echo "Helix config symlinked to ${HELIX_CONFIG_DIR}/config.toml"