xonecas.io
56101
Df

dotfiles / commit 22443a7

Repurpose dotfiles: 0x96f palette everywhere, KDE dark/light sync

- Remove old opencode config
- Add Alacritty config with 0x96f dark/light themes and live reload
- Add VSCodium settings + extensions list with auto dark/light switching
- Add pi coding agent themes (0x96f-dark, 0x96f-light)
- Add theme-switcher: D-Bus daemon syncing KDE mode to Alacritty, pi, nvim
- Update shell: two-line prompt with exit status, command timer, git info
- Update nvim: background-adaptive ansi.vim, lualine theme, <leader>T toggle
- Update README with full documentation and color coordination diagram

xonecas2026-04-05 22443a70a9c6a6e48adf9804f00ad04c342aec93 parent cf25c5e

36 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

README.md+100−34
@@ -1,58 +1,124 @@
11 # dotfiles
22
3-Personal configuration files for development tools and environments.
3+Personal configs for a KDE Plasma 6 + Alacritty + Neovim setup on CachyOS (Arch).
44
5-## Overview
5+Everything uses the [0x96f](https://github.com/0x96f-org/) color palette, with
6+coordinated dark/light switching that follows KDE's sunrise/sunset schedule.
67
7-This repository contains my personal configuration files (dotfiles) for various development tools. These configurations are tailored to my workflow and preferences.
8+## What's in here
89
9-## Installation
10-
11-The repository includes a master installation script that can install all configs or specific ones.
10+```
11+alacritty/ Alacritty terminal config + 0x96f dark/light themes
12+codium/ VSCodium settings + extensions list
13+nvim/ Neovim config (lazy.nvim, LSP, fzf-lua, ANSI color scheme)
14+pi/ pi coding agent themes (0x96f-dark, 0x96f-light)
15+shell/ Bash config — aliases, prompt with exit status & timer, git info
16+theme-switcher/ D-Bus watcher that syncs all tools with KDE dark/light mode
17+```
1218
13-### Install Everything
19+## Installation
1420
1521 ```bash
16-cd /path/to/dotfiles
22+# Everything
1723 ./install.sh
24+
25+# Specific configs
26+./install.sh nvim
27+./install.sh alacritty theme-switcher pi
1828 ```
1929
20-### Install Specific Configs
30+Each config either symlinks into `~/.config/` or runs its own `install.sh` for
31+custom placement.
32+
33+## Color Coordination
34+
35+All tools share the same 0x96f palette. The theme switcher daemon keeps
36+everything in sync when KDE toggles between dark and light mode:
2137
22-```bash
23-./install.sh nvim # Only Neovim
24-./install.sh opencode # Only OpenCode
25-./install.sh shell # Only Shell config
26-./install.sh nvim shell # Multiple specific configs
38+```
39+KDE sunrise/sunset toggle
40+ → D-Bus signal (org.freedesktop.appearance)
41+ → alacritty-theme-switcher
42+ ├─ Alacritty cp dark.toml/light.toml → current-theme.toml (live reload)
43+ ├─ pi jq .theme → settings.json (next session)
44+ ├─ Neovim writes ~/.local/state/kde-color-mode (<leader>T toggle)
45+ ├─ VSCodium built-in window.autoDetectColorScheme (automatic)
46+ └─ (extensible — anything can read the signal file)
2747 ```
2848
29-### Manual Symlinks
49+### Neovim specifics
3050
31-Alternatively, symlink the desired config directories to their expected locations:
51+The `ansi.vim` colorscheme uses **cterm ANSI indices only** (`set notermguicolors`),
52+so nvim inherits its colors directly from the terminal. When Alacritty's theme
53+changes, nvim gets new colors immediately. The `theme-sync.lua` plugin polls a
54+signal file to flip `background=dark/light`, which re-sources the colorscheme
55+to adjust UI elements (status line, cursor line, popups, etc.) that need
56+different treatment on light vs dark backgrounds.
3257
33-```bash
34-# Neovim
35-ln -s /path/to/dotfiles/nvim ~/.config/nvim
58+## Details
59+
60+### Shell (`shell/`)
61+
62+Full reference bashrc is in `shell/bashrc`. Key features:
63+
64+- **Two-line prompt**: `HH:MM:SS exit_code duration ~/path (branch*)` on the
65+ first line, `$ ` on the second.
66+- **Command timer**: uses a `DEBUG` trap + `$SECONDS` — pure bash, no
67+ external dependencies.
68+- **Git branch + dirty flag** in the prompt.
69+- `greet` function: random cowsay + fortune + lolcat on shell start.
70+- fzf integration, aliases for git/nvim.
3671
37-# OpenCode
38-ln -s /path/to/dotfiles/opencode ~/.config/opencode
72+### Alacritty (`alacritty/`)
3973
40-# Shell (or use shell/install.sh for automatic shell rc integration)
41-ln -s /path/to/dotfiles/shell ~/.config/shell
74+- Config with `live_config_reload = true`.
75+- Colors live in a separate `current-theme.toml` imported via Alacritty's
76+ `import` directive — the theme switcher writes this file.
77+- Two themes based on the [0x96f palette](https://github.com/0x96f-org/0x96f-term-theme):
78+ - `themes/dark.toml` — dark background (`#262427`)
79+ - `themes/light.toml` — light complement (`#fafafa`)
80+
81+### Pi (`pi/`)
82+
83+Custom themes for the [pi](https://github.com/badlogic/pi-mono) coding agent:
84+
85+- `0x96f-dark.json` — mapped from the dark palette
86+- `0x96f-light.json` — mapped from the light palette
87+
88+Both use the same semantic mapping: cyan for accents, blue for borders,
89+magenta for keywords, green for strings, yellow for headings/types.
90+
91+### Theme Switcher (`theme-switcher/`)
92+
93+A bash script + systemd user service that watches KDE's dark/light mode via
94+D-Bus (`org.freedesktop.portal.Settings`).
95+
96+**Dependencies:** `dbus-monitor` (usually pre-installed), `jq` (for pi
97+settings; gracefully skipped if absent).
98+
99+**Service management:**
100+
101+```bash
102+systemctl --user status alacritty-theme-switcher
103+journalctl --user -u alacritty-theme-switcher -f
42104 ```
43105
44-## Requirements
106+### VSCodium (`codium/`)
107+
108+- Settings with `window.autoDetectColorScheme` for automatic dark/light switching.
109+- `preferredDarkColorTheme`: **0x96f** (from marketplace).
110+- `preferredLightColorTheme`: **0x96f Light** (custom, built in `~/src/0x96f-light-codium-theme`).
111+- `extensions.txt` — list of installed extensions for reproducible setup.
45112
46-### Core Requirements
47-- Neovim >= 0.9.0
48-- Git
49-- OpenCode CLI tool
113+### Neovim (`nvim/`)
50114
51-### Optional Dependencies
52-- fortune, cowsay, lolcat (for shell greeting function)
115+See [`nvim/README.md`](nvim/README.md) for details.
53116
54-## Post-Installation
117+## Requirements
55118
56-1. **Neovim**: Open nvim - plugins will auto-install via lazy.nvim on first run
57-2. **Shell**: Restart your shell to load new aliases and functions
58-3. **LSP Servers**: Install LSP servers via `:Mason` in Neovim if needed
119+- Bash 4+
120+- Neovim ≥ 0.9
121+- Alacritty ≥ 0.13 (for `import` support)
122+- KDE Plasma 6 (for the theme switcher D-Bus integration)
123+- Optional: `fortune`, `cowsay`, `lolcat` (shell greeting)
124+- Optional: `jq` (pi theme switching)
alacritty/alacritty.toml+139−0
@@ -0,0 +1,139 @@
1+[env]
2+TERM = "xterm-256color"
3+WINIT_X11_SCALE_FACTOR = "1"
4+
5+[window]
6+dynamic_padding = true
7+decorations = "full"
8+title = "hulk@CachyOS"
9+opacity = 1
10+
11+[window.dimensions]
12+columns = 140
13+lines = 32
14+
15+[window.class]
16+instance = "Alacritty"
17+general = "Alacritty"
18+
19+[scrolling]
20+history = 10000
21+multiplier = 3
22+
23+[font]
24+size = 14
25+
26+[font.normal]
27+family = "ZedMono Nerd Font Mono"
28+style = "Regular"
29+
30+[font.bold]
31+family = "ZedMono Nerd Font Mono"
32+style = "Bold"
33+
34+[font.italic]
35+family = "ZedMono Nerd Font Mono"
36+style = "Italic"
37+
38+[font.bold_italic]
39+family = "ZedMono Nerd Font Mono"
40+style = "Bold Italic"
41+
42+[selection]
43+semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"
44+save_to_clipboard = true
45+
46+[cursor]
47+style = "Underline"
48+vi_mode_style = "None"
49+unfocused_hollow = true
50+thickness = 0.15
51+
52+[mouse]
53+hide_when_typing = true
54+
55+[[mouse.bindings]]
56+mouse = "Middle"
57+action = "PasteSelection"
58+
59+[keyboard]
60+[[keyboard.bindings]]
61+key = "Paste"
62+action = "Paste"
63+
64+[[keyboard.bindings]]
65+key = "Copy"
66+action = "Copy"
67+
68+[[keyboard.bindings]]
69+key = "L"
70+mods = "Control"
71+action = "ClearLogNotice"
72+
73+[[keyboard.bindings]]
74+key = "L"
75+mods = "Control"
76+mode = "~Vi"
77+chars = "\f"
78+
79+[[keyboard.bindings]]
80+key = "PageUp"
81+mods = "Shift"
82+mode = "~Alt"
83+action = "ScrollPageUp"
84+
85+[[keyboard.bindings]]
86+key = "PageDown"
87+mods = "Shift"
88+mode = "~Alt"
89+action = "ScrollPageDown"
90+
91+[[keyboard.bindings]]
92+key = "Home"
93+mods = "Shift"
94+mode = "~Alt"
95+action = "ScrollToTop"
96+
97+[[keyboard.bindings]]
98+key = "End"
99+mods = "Shift"
100+mode = "~Alt"
101+action = "ScrollToBottom"
102+
103+[[keyboard.bindings]]
104+key = "V"
105+mods = "Control|Shift"
106+action = "Paste"
107+
108+[[keyboard.bindings]]
109+key = "C"
110+mods = "Control|Shift"
111+action = "Copy"
112+
113+[[keyboard.bindings]]
114+key = "F"
115+mods = "Control|Shift"
116+action = "SearchForward"
117+
118+[[keyboard.bindings]]
119+key = "B"
120+mods = "Control|Shift"
121+action = "SearchBackward"
122+
123+[[keyboard.bindings]]
124+key = "C"
125+mods = "Control|Shift"
126+mode = "Vi"
127+action = "ClearSelection"
128+
129+[[keyboard.bindings]]
130+key = "Key0"
131+mods = "Control"
132+action = "ResetFontSize"
133+
134+[general]
135+live_config_reload = true
136+working_directory = "None"
137+import = [
138+ "~/.config/alacritty/current-theme.toml"
139+]
alacritty/install.sh+39−0
@@ -0,0 +1,39 @@
1+#!/usr/bin/env bash
2+# Install Alacritty config and themes.
3+set -euo pipefail
4+
5+repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/alacritty"
7+
8+mkdir -p "$config_dir/themes"
9+
10+# Link main config
11+for f in alacritty.toml; do
12+ target="$config_dir/$f"
13+ if [ -e "$target" ] || [ -L "$target" ]; then
14+ echo "Skipping $f (already exists): $target"
15+ else
16+ ln -s "$repo_dir/$f" "$target"
17+ echo "Linked $f -> $target"
18+ fi
19+done
20+
21+# Link theme files
22+for f in "$repo_dir"/themes/*.toml; do
23+ name="$(basename "$f")"
24+ target="$config_dir/themes/$name"
25+ if [ -e "$target" ] || [ -L "$target" ]; then
26+ echo "Skipping themes/$name (already exists): $target"
27+ else
28+ ln -s "$f" "$target"
29+ echo "Linked themes/$name -> $target"
30+ fi
31+done
32+
33+# Initialize current-theme.toml with dark if it doesn't exist
34+if [ ! -e "$config_dir/current-theme.toml" ]; then
35+ cp "$repo_dir/themes/dark.toml" "$config_dir/current-theme.toml"
36+ echo "Initialized current-theme.toml (dark)"
37+fi
38+
39+echo "Alacritty config installed."
alacritty/themes/dark.toml+33−0
@@ -0,0 +1,33 @@
1+# 0x96f dark theme
2+# https://github.com/0x96f-org/0x96f-term-theme/blob/main/alacritty/0x96f.toml
3+
4+[window]
5+decorations_theme_variant = "Dark"
6+
7+[colors.primary]
8+background = '#262427'
9+foreground = '#fcfcfa'
10+
11+[colors.cursor]
12+text = '#000000'
13+cursor = '#fcfcfa'
14+
15+[colors.normal]
16+black = '#262427'
17+red = '#ff7272'
18+green = '#bcdf59'
19+yellow = '#ffca58'
20+blue = '#49cae4'
21+magenta = '#a093e2'
22+cyan = '#aee8f4'
23+white = '#fcfcfa'
24+
25+[colors.bright]
26+black = '#545452'
27+red = '#ff8787'
28+green = '#c6e472'
29+yellow = '#ffd271'
30+blue = '#64d2e8'
31+magenta = '#aea3e6'
32+cyan = '#baebf6'
33+white = '#fcfcfa'
alacritty/themes/light.toml+32−0
@@ -0,0 +1,32 @@
1+# 0x96f-inspired light theme
2+
3+[window]
4+decorations_theme_variant = "Light"
5+
6+[colors.primary]
7+background = '#fafafa'
8+foreground = '#2a2a2a'
9+
10+[colors.cursor]
11+text = '#fafafa'
12+cursor = '#2a2a2a'
13+
14+[colors.normal]
15+black = '#2a2a2a'
16+red = '#d1364e'
17+green = '#6ea226'
18+yellow = '#c08a19'
19+blue = '#2b8db3'
20+magenta = '#7c5ec1'
21+cyan = '#2b9da4'
22+white = '#fafafa'
23+
24+[colors.bright]
25+black = '#6a6a6a'
26+red = '#e05265'
27+green = '#8fbf44'
28+yellow = '#d9a53e'
29+blue = '#4da8cc'
30+magenta = '#9579d1'
31+cyan = '#4db5b5'
32+white = '#ffffff'
codium/extensions.txt+4−0
@@ -0,0 +1,4 @@
1+dev-onyx.onyx-theme
2+filipjane.0x96f-vscode-theme
3+github.github-vscode-theme
4+xonecas.0x96f-light-theme
codium/install.sh+39−0
@@ -0,0 +1,39 @@
1+#!/usr/bin/env bash
2+# Install VSCodium settings and extensions.
3+set -euo pipefail
4+
5+repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/VSCodium/User"
7+
8+mkdir -p "$config_dir"
9+
10+# Link settings
11+target="$config_dir/settings.json"
12+if [ -e "$target" ] || [ -L "$target" ]; then
13+ echo "Skipping settings.json (already exists): $target"
14+else
15+ ln -s "$repo_dir/settings.json" "$target"
16+ echo "Linked settings.json -> $target"
17+fi
18+
19+# Install extensions
20+if command -v codium >/dev/null 2>&1; then
21+ while IFS= read -r ext; do
22+ [ -z "$ext" ] && continue
23+ codium --install-extension "$ext" --force 2>/dev/null && \
24+ echo "Installed $ext" || echo "Failed: $ext"
25+ done < "$repo_dir/extensions.txt"
26+else
27+ echo "codium not found, skipping extension install."
28+fi
29+
30+# Install 0x96f-light theme from local source if available
31+local_theme="$HOME/src/0x96f-light-codium-theme"
32+if [ -d "$local_theme" ] && command -v codium >/dev/null 2>&1; then
33+ vsix=$(find "$local_theme" -maxdepth 1 -name "*.vsix" | head -1)
34+ if [ -n "$vsix" ]; then
35+ codium --install-extension "$vsix" && echo "Installed 0x96f-light from VSIX"
36+ fi
37+fi
38+
39+echo "VSCodium config installed."
codium/settings.json+24−0
@@ -0,0 +1,24 @@
1+{
2+ "workbench.colorTheme": "0x96f",
3+ "window.commandCenter": false,
4+ "workbench.layoutControl.enabled": false,
5+ "workbench.activityBar.location": "top",
6+ "terminal.integrated.initialHint": false,
7+ "editor.fontSize": 16,
8+ "editor.fontFamily": "'ZedMono Nerd Font Mono', 'Droid Sans Mono', monospace",
9+ "terminal.integrated.fontSize": 16,
10+ "workbench.startupEditor": "none",
11+ "editor.defaultFormatter": "esbenp.prettier-vscode",
12+ "editor.formatOnSave": true,
13+ "chat.disableAIFeatures": true,
14+ "chat.extensionUnification.enabled": false,
15+ "editor.tabSize": 2,
16+ "editor.wordWrap": "on",
17+ "editor.minimap.enabled": false,
18+ "workbench.secondarySideBar.defaultVisibility": "hidden",
19+ "security.workspace.trust.untrustedFiles": "open",
20+ "workbench.preferredDarkColorTheme": "0x96f",
21+ "workbench.preferredHighContrastLightColorTheme": "GitHub Light High Contrast",
22+ "workbench.preferredLightColorTheme": "0x96f Light",
23+ "window.autoDetectColorScheme": true,
24+}
install.sh+32−27
@@ -1,7 +1,10 @@
11 #!/usr/bin/env bash
2-# Install configs from this repo to XDG config dir.
3-# Usage: ./install.sh [config ...]; no args installs all configs.
4-# If a config has its own install.sh, it is executed instead of linking.
2+# Install configs from this repo.
3+# Usage: ./install.sh [config ...]
4+# No args installs all configs.
5+# Available configs: alacritty, nvim, shell, theme-switcher
6+#
7+# If a config has its own install.sh, it is executed instead of linked.
58 set -euo pipefail
69
710 repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -9,35 +12,37 @@ config_root="${XDG_CONFIG_HOME:-$HOME/.config}"
912
1013 configs=()
1114 if [ "$#" -gt 0 ]; then
12- configs=("$@")
15+ configs=("$@")
1316 else
14- shopt -s nullglob
15- for dir in "$repo_dir"/*; do
16- if [ -d "$dir" ]; then
17- configs+=("$(basename "$dir")")
18- fi
19- done
17+ shopt -s nullglob
18+ for dir in "$repo_dir"/*; do
19+ if [ -d "$dir" ]; then
20+ configs+=("$(basename "$dir")")
21+ fi
22+ done
2023 fi
2124
2225 for config in "${configs[@]}"; do
23- config_dir="$repo_dir/$config"
24- if [ ! -d "$config_dir" ]; then
25- echo "Unknown config: $config" >&2
26- exit 1
27- fi
26+ config_dir="$repo_dir/$config"
27+ if [ ! -d "$config_dir" ]; then
28+ echo "Unknown config: $config" >&2
29+ exit 1
30+ fi
2831
29- if [ -f "$config_dir/install.sh" ]; then
30- bash "$config_dir/install.sh"
31- continue
32- fi
32+ echo "==> Installing $config"
3333
34- mkdir -p "$config_root"
35- target="$config_root/$config"
36- if [ -e "$target" ] || [ -L "$target" ]; then
37- echo "Skipping $config (target exists): $target"
38- continue
39- fi
34+ if [ -f "$config_dir/install.sh" ]; then
35+ bash "$config_dir/install.sh"
36+ continue
37+ fi
38+
39+ mkdir -p "$config_root"
40+ target="$config_root/$config"
41+ if [ -e "$target" ] || [ -L "$target" ]; then
42+ echo " Skipping (target exists): $target"
43+ continue
44+ fi
4045
41- ln -s "$config_dir" "$target"
42- echo "Linked $config -> $target"
46+ ln -s "$config_dir" "$target"
47+ echo " Linked $config -> $target"
4348 done
nvim/colors/ansi.vim+69−36
@@ -1,7 +1,10 @@
11 " https://hamvocke.com/blog/ansi-vim-color-scheme/
2-set background=dark
2+" Supports both dark and light backgrounds via terminal ANSI colors.
33
44 hi clear
5+if exists('syntax_on')
6+ syntax reset
7+endif
58
69 let g:colors_name = 'ansi'
710 set notermguicolors
@@ -27,63 +30,39 @@ set notermguicolors
2730 " (if your terminal and font support it), bold, reverse, underlined, etc.
2831 " See ':help attr-list' for possible options.
2932
30-" Editor Elements
31-hi NonText ctermfg=0
33+" Editor Elements — background-adaptive
34+" Uses 0/15 (black/white) which swap roles depending on terminal theme.
35+hi NonText ctermfg=8
3236 hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
3337 hi Underlined cterm=underline
3438 hi Bold cterm=bold
3539 hi Italic cterm=italic
36-hi StatusLine ctermfg=15 ctermbg=8 cterm=NONE
37-hi StatusLineNC ctermfg=15 ctermbg=0 cterm=NONE
38-hi VertSplit ctermfg=0 ctermbg=NONE
39-hi WinSeparator ctermfg=0 ctermbg=NONE
40-hi TabLine ctermfg=7 ctermbg=0
41-hi TabLineFill ctermfg=0 ctermbg=NONE
42-hi TabLineSel ctermfg=0 ctermbg=11
4340 hi Title ctermfg=4 cterm=bold
44-hi CursorLine ctermbg=0 ctermfg=NONE
45-hi Cursor ctermbg=15 ctermfg=0
46-hi CursorColumn ctermbg=0
4741 hi LineNr ctermfg=8
4842 hi CursorLineNr ctermfg=6
4943 hi helpLeadBlank ctermbg=NONE ctermfg=NONE
5044 hi helpNormal ctermbg=NONE ctermfg=NONE
51-hi Visual ctermbg=8 ctermfg=15 cterm=bold
52-hi VisualNOS ctermbg=8 ctermfg=15 cterm=bold
53-hi Pmenu ctermbg=0 ctermfg=15
54-hi PmenuSbar ctermbg=8 ctermfg=7
55-hi PmenuSel ctermbg=8 ctermfg=15 cterm=bold
56-hi PmenuThumb ctermbg=7 ctermfg=NONE
5745 hi FoldColumn ctermfg=7
5846 hi Folded ctermfg=12
59-hi WildMenu ctermbg=0 ctermfg=15 cterm=NONE
60-hi SpecialKey ctermfg=0
61-hi IncSearch ctermbg=1 ctermfg=0
62-hi CurSearch ctermbg=3 ctermfg=0
63-hi Search ctermbg=11 ctermfg=0
64-hi Directory ctermfg=4
65-hi MatchParen ctermbg=0 ctermfg=3 cterm=underline
6647 hi SpellBad cterm=undercurl
6748 hi SpellCap cterm=undercurl
6849 hi SpellLocal cterm=undercurl
6950 hi SpellRare cterm=undercurl
70-hi ColorColumn ctermbg=8
7151 hi SignColumn ctermfg=7
72-hi ModeMsg ctermbg=15 ctermfg=0 cterm=bold
7352 hi MoreMsg ctermfg=4
7453 hi Question ctermfg=4
75-hi QuickFixLine ctermbg=0 ctermfg=14
7654 hi Conceal ctermfg=8
77-hi ToolbarLine ctermbg=0 ctermfg=15
78-hi ToolbarButton ctermbg=8 ctermfg=15
7955 hi debugPC ctermfg=7
8056 hi debugBreakpoint ctermfg=8
8157 hi ErrorMsg ctermfg=1 cterm=bold,italic
8258 hi WarningMsg ctermfg=11
83-hi DiffAdd ctermbg=10 ctermfg=0
84-hi DiffChange ctermbg=12 ctermfg=0
85-hi DiffDelete ctermbg=9 ctermfg=0
86-hi DiffText ctermbg=14 ctermfg=0
59+hi Directory ctermfg=4
60+hi SpecialKey ctermfg=8
61+hi IncSearch ctermbg=1 ctermfg=0
62+hi CurSearch ctermbg=3 ctermfg=0
63+hi Search ctermbg=11 ctermfg=0
64+hi MatchParen ctermbg=NONE ctermfg=3 cterm=underline,bold
65+hi ColorColumn ctermbg=8
8766 hi diffAdded ctermfg=10
8867 hi diffRemoved ctermfg=9
8968 hi diffChanged ctermfg=12
@@ -96,6 +75,60 @@ hi healthError ctermfg=1
9675 hi healthSuccess ctermfg=2
9776 hi healthWarning ctermfg=3
9877
78+if &background ==# 'dark'
79+ hi StatusLine ctermfg=15 ctermbg=8 cterm=NONE
80+ hi StatusLineNC ctermfg=15 ctermbg=0 cterm=NONE
81+ hi VertSplit ctermfg=0 ctermbg=NONE
82+ hi WinSeparator ctermfg=0 ctermbg=NONE
83+ hi TabLine ctermfg=7 ctermbg=0
84+ hi TabLineFill ctermfg=0 ctermbg=NONE
85+ hi TabLineSel ctermfg=0 ctermbg=11
86+ hi CursorLine ctermbg=0 ctermfg=NONE
87+ hi Cursor ctermbg=15 ctermfg=0
88+ hi CursorColumn ctermbg=0
89+ hi Visual ctermbg=8 ctermfg=15 cterm=bold
90+ hi VisualNOS ctermbg=8 ctermfg=15 cterm=bold
91+ hi Pmenu ctermbg=0 ctermfg=15
92+ hi PmenuSbar ctermbg=8 ctermfg=7
93+ hi PmenuSel ctermbg=8 ctermfg=15 cterm=bold
94+ hi PmenuThumb ctermbg=7 ctermfg=NONE
95+ hi WildMenu ctermbg=0 ctermfg=15 cterm=NONE
96+ hi QuickFixLine ctermbg=0 ctermfg=14
97+ hi ModeMsg ctermbg=15 ctermfg=0 cterm=bold
98+ hi ToolbarLine ctermbg=0 ctermfg=15
99+ hi ToolbarButton ctermbg=8 ctermfg=15
100+ hi DiffAdd ctermbg=10 ctermfg=0
101+ hi DiffChange ctermbg=12 ctermfg=0
102+ hi DiffDelete ctermbg=9 ctermfg=0
103+ hi DiffText ctermbg=14 ctermfg=0
104+else
105+ hi StatusLine ctermfg=0 ctermbg=7 cterm=NONE
106+ hi StatusLineNC ctermfg=8 ctermbg=7 cterm=NONE
107+ hi VertSplit ctermfg=7 ctermbg=NONE
108+ hi WinSeparator ctermfg=7 ctermbg=NONE
109+ hi TabLine ctermfg=8 ctermbg=7
110+ hi TabLineFill ctermfg=7 ctermbg=NONE
111+ hi TabLineSel ctermfg=15 ctermbg=4
112+ hi CursorLine ctermbg=7 ctermfg=NONE
113+ hi Cursor ctermbg=0 ctermfg=15
114+ hi CursorColumn ctermbg=7
115+ hi Visual ctermbg=7 ctermfg=0 cterm=bold
116+ hi VisualNOS ctermbg=7 ctermfg=0 cterm=bold
117+ hi Pmenu ctermbg=7 ctermfg=0
118+ hi PmenuSbar ctermbg=7 ctermfg=8
119+ hi PmenuSel ctermbg=8 ctermfg=15 cterm=bold
120+ hi PmenuThumb ctermbg=8 ctermfg=NONE
121+ hi WildMenu ctermbg=7 ctermfg=0 cterm=NONE
122+ hi QuickFixLine ctermbg=7 ctermfg=4
123+ hi ModeMsg ctermbg=0 ctermfg=15 cterm=bold
124+ hi ToolbarLine ctermbg=7 ctermfg=0
125+ hi ToolbarButton ctermbg=8 ctermfg=15
126+ hi DiffAdd ctermbg=2 ctermfg=15
127+ hi DiffChange ctermbg=4 ctermfg=15
128+ hi DiffDelete ctermbg=1 ctermfg=15
129+ hi DiffText ctermbg=6 ctermfg=0
130+endif
131+
99132 " Syntax
100133 hi Comment ctermfg=8 cterm=italic
101134 hi Constant ctermfg=3
@@ -209,7 +242,7 @@ hi link @diff.minus diffRemoved
209242 hi link @diff.delta diffChanged
210243
211244 " nvim-tree colors
212-hi NvimTreeNormal ctermfg=15 ctermbg=NONE
245+hi NvimTreeNormal ctermfg=NONE ctermbg=NONE
213246 hi NvimTreeFolderIcon ctermfg=4
214247 hi NvimTreeFolderName ctermfg=4
215248 hi NvimTreeOpenedFolderName ctermfg=4
nvim/init.lua+38−1
@@ -76,11 +76,40 @@ local opts = { noremap = true, silent = true }
7676 -- Search highlighting
7777 keymap('n', '<leader>h', ':nohlsearch<CR>', opts)
7878 keymap('n', '<leader>q', ':qall<CR>', { noremap = true, silent = true, desc = 'Quit all' })
79+keymap('n', '<leader>s', ':write<CR>', { noremap = true, silent = true, desc = 'Save buffer' })
80+keymap('n', '<leader>S', ':wall<CR>', { noremap = true, silent = true, desc = 'Save all buffers' })
7981
8082 -- LSP formatting
8183 keymap('n', '<leader>f', function()
8284 vim.lsp.buf.format({ async = true })
83-end, { noremap = true, silent = true, desc = 'Format buffer with LSP' })
85+end, { noremap = true, silent = true, desc = 'Format with LSP' })
86+
87+-- Prettier formatting
88+keymap('n', '<leader>F', function()
89+ local prettier_path = vim.fn.stdpath('data') .. '/mason/bin/prettier'
90+ if vim.fn.executable(prettier_path) == 1 then
91+ local bufnr = vim.api.nvim_get_current_buf()
92+ local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
93+ local content = table.concat(lines, '\n')
94+
95+ vim.fn.jobstart({ prettier_path, '--stdin-filepath', vim.api.nvim_buf_get_name(bufnr) }, {
96+ stdout_buffered = true,
97+ on_stdout = function(_, data)
98+ if data then
99+ vim.schedule(function()
100+ local formatted = table.concat(data, '\n'):gsub('\n$', '')
101+ local new_lines = vim.split(formatted, '\n')
102+ vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, new_lines)
103+ print('Formatted with prettier')
104+ end)
105+ end
106+ end,
107+ stdin = content,
108+ })
109+ else
110+ print('Prettier not found. Run :Mason to install it.')
111+ end
112+end, { noremap = true, silent = false, desc = 'Format with Prettier' })
84113
85114 -- Movement remaps
86115 keymap('n', 'j', 'gj', { noremap = true })
@@ -103,6 +132,14 @@ vim.api.nvim_create_user_command('W', 'w', {})
103132 -- Colorscheme
104133 vim.cmd.colorscheme('ansi')
105134
135+-- Re-apply colorscheme when background changes (dark/light switch)
136+vim.api.nvim_create_autocmd('OptionSet', {
137+ pattern = 'background',
138+ callback = function()
139+ vim.cmd.colorscheme('ansi')
140+ end,
141+})
142+
106143 -- Override diff highlight groups to remove backgrounds (keep only sign column indicators)
107144 vim.api.nvim_set_hl(0, 'DiffAdd', { ctermbg = 'NONE', ctermfg = 'NONE' })
108145 vim.api.nvim_set_hl(0, 'DiffChange', { ctermbg = 'NONE', ctermfg = 'NONE' })
nvim/lazy-lock.json+1−0
@@ -1,6 +1,7 @@
11 {
22 "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
33 "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
4+ "fzf-lua": { "branch": "main", "commit": "fb8c50ba62a0daa433b7ac2b78834f318322b879" },
45 "gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
56 "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
67 "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
nvim/lua/lualine/themes/ansi.lua+17−33
@@ -1,30 +1,14 @@
1--- Standard ANSI color hex values
2--- These represent typical ANSI colors but will adapt to your terminal's palette
3-local colors = {
4- black = '#000000',
5- red = '#800000',
6- green = '#008000',
7- yellow = '#808000',
8- blue = '#000080',
9- magenta = '#800080',
10- cyan = '#008080',
11- white = '#c0c0c0',
12- bright_black = '#808080',
13- bright_red = '#ff0000',
14- bright_green = '#00ff00',
15- bright_yellow = '#ffff00',
16- bright_blue = '#0000ff',
17- bright_magenta = '#ff00ff',
18- bright_cyan = '#00ffff',
19- bright_white = '#ffffff',
20-}
1+-- Lualine theme using ANSI cterm colors.
2+-- Adapts to dark/light background automatically.
3+
4+local is_light = vim.o.background == 'light'
215
22-local section_b = { fg = colors.black, bg = colors.bright_black }
23-local section_c = { fg = colors.bright_white, bg = colors.black }
6+local section_b = { fg = is_light and 0 or 15, bg = 8 }
7+local section_c = { fg = is_light and 0 or 15, bg = is_light and 7 or 0 }
248
259 local theme = {
2610 normal = {
27- a = { fg = colors.black, bg = colors.yellow, gui = 'bold' },
11+ a = { fg = 0, bg = 3, gui = 'bold' },
2812 b = section_b,
2913 c = section_c,
3014 x = section_c,
@@ -32,7 +16,7 @@ local theme = {
3216 z = section_b,
3317 },
3418 insert = {
35- a = { fg = colors.black, bg = colors.green, gui = 'bold' },
19+ a = { fg = 0, bg = 2, gui = 'bold' },
3620 b = section_b,
3721 c = section_c,
3822 x = section_c,
@@ -40,7 +24,7 @@ local theme = {
4024 z = section_b,
4125 },
4226 visual = {
43- a = { fg = colors.black, bg = colors.magenta, gui = 'bold' },
27+ a = { fg = 0, bg = 5, gui = 'bold' },
4428 b = section_b,
4529 c = section_c,
4630 x = section_c,
@@ -48,7 +32,7 @@ local theme = {
4832 z = section_b,
4933 },
5034 replace = {
51- a = { fg = colors.black, bg = colors.cyan, gui = 'bold' },
35+ a = { fg = 0, bg = 6, gui = 'bold' },
5236 b = section_b,
5337 c = section_c,
5438 x = section_c,
@@ -56,7 +40,7 @@ local theme = {
5640 z = section_b,
5741 },
5842 command = {
59- a = { fg = colors.black, bg = colors.blue, gui = 'bold' },
43+ a = { fg = 0, bg = 4, gui = 'bold' },
6044 b = section_b,
6145 c = section_c,
6246 x = section_c,
@@ -64,12 +48,12 @@ local theme = {
6448 z = section_b,
6549 },
6650 inactive = {
67- a = { fg = colors.bright_white, bg = colors.black },
68- b = { fg = colors.bright_white, bg = colors.black },
69- c = { fg = colors.bright_white, bg = colors.black },
70- x = { fg = colors.bright_white, bg = colors.black },
71- y = { fg = colors.bright_white, bg = colors.black },
72- z = { fg = colors.bright_white, bg = colors.black },
51+ a = { fg = 8, bg = is_light and 7 or 0 },
52+ b = { fg = 8, bg = is_light and 7 or 0 },
53+ c = { fg = 8, bg = is_light and 7 or 0 },
54+ x = { fg = 8, bg = is_light and 7 or 0 },
55+ y = { fg = 8, bg = is_light and 7 or 0 },
56+ z = { fg = 8, bg = is_light and 7 or 0 },
7357 },
7458 }
7559
nvim/lua/plugins/fzf-lua.lua+21−0
@@ -0,0 +1,21 @@
1+-- fzf-lua - Fuzzy file and content finder
2+return {
3+ 'ibhagwan/fzf-lua',
4+ dependencies = { 'nvim-tree/nvim-web-devicons' },
5+ keys = {
6+ {
7+ '<leader>p',
8+ function()
9+ require('fzf-lua').files({ gitignore = true })
10+ end,
11+ desc = 'Find files (fuzzy path)',
12+ },
13+ },
14+ config = function()
15+ require('fzf-lua').setup({
16+ files = {
17+ gitignore = true,
18+ },
19+ })
20+ end,
21+}
nvim/lua/plugins/lsp.lua+67−39
@@ -4,7 +4,8 @@ return {
44 {
55 'williamboman/mason.nvim',
66 config = function()
7- require('mason').setup({
7+ local mason = require('mason')
8+ mason.setup({
89 ui = {
910 border = 'single',
1011 icons = {
@@ -14,33 +15,16 @@ return {
1415 }
1516 }
1617 })
17- end,
18- },
19-
20- -- Mason-lspconfig: Bridge between mason and lspconfig
21- {
22- 'williamboman/mason-lspconfig.nvim',
23- dependencies = { 'williamboman/mason.nvim' },
24- config = function()
25- require('mason-lspconfig').setup({
26- -- Automatically install these language servers
27- ensure_installed = {},
28- -- Auto-install servers configured in lspconfig
29- automatic_installation = false,
30- })
31- end,
32- },
33-
34- -- LSP configurations
35- {
36- 'neovim/nvim-lspconfig',
37- dependencies = {
38- 'williamboman/mason.nvim',
39- 'williamboman/mason-lspconfig.nvim',
40- },
41- config = function()
42- local lspconfig = require('lspconfig')
43-
18+
19+ -- Auto-install language servers and formatters if not present
20+ local mason_registry = require('mason-registry')
21+ local packages = { 'gopls', 'marksman', 'prettier' }
22+
23+ for _, package in ipairs(packages) do
24+ if not mason_registry.is_installed(package) then
25+ vim.cmd('MasonInstall ' .. package)
26+ end
27+ end
4428 -- LSP keybindings (only active when LSP is attached)
4529 vim.api.nvim_create_autocmd('LspAttach', {
4630 group = vim.api.nvim_create_augroup('UserLspConfig', {}),
@@ -68,31 +52,75 @@ return {
6852 -- Default server capabilities
6953 local capabilities = vim.lsp.protocol.make_client_capabilities()
7054
71- -- Setup language servers here
55+ -- Setup language servers using vim.lsp.config
56+
57+ -- Go language server
58+ vim.lsp.config.gopls = {
59+ cmd = { 'gopls' },
60+ filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' },
61+ root_markers = { 'go.work', 'go.mod', '.git' },
62+ capabilities = capabilities,
63+ settings = {
64+ gopls = {
65+ analyses = {
66+ unusedparams = true,
67+ },
68+ staticcheck = true,
69+ gofumpt = true,
70+ },
71+ },
72+ }
73+ vim.lsp.enable('gopls')
74+
75+ -- Markdown language server
76+ vim.lsp.config.marksman = {
77+ cmd = { 'marksman', 'server' },
78+ filetypes = { 'markdown', 'markdown.mdx' },
79+ root_markers = { '.git', '.marksman.toml' },
80+ capabilities = capabilities,
81+ }
82+ vim.lsp.enable('marksman')
83+
7284 -- Example configurations (uncomment and modify as needed):
7385
74- -- lspconfig.lua_ls.setup({
86+ -- vim.lsp.config.lua_ls = {
87+ -- cmd = { 'lua-language-server' },
88+ -- filetypes = { 'lua' },
89+ -- root_markers = { '.luarc.json', '.luarc.jsonc', '.luacheckrc', '.stylua.toml', 'stylua.toml', 'selene.toml', 'selene.yml', '.git' },
7590 -- capabilities = capabilities,
7691 -- settings = {
7792 -- Lua = {
7893 -- diagnostics = {
79- -- globals = { 'vim' }, -- Recognize 'vim' global
94+ -- globals = { 'vim' },
8095 -- },
8196 -- },
8297 -- },
83- -- })
98+ -- }
99+ -- vim.lsp.enable('lua_ls')
84100
85- -- lspconfig.ts_ls.setup({
101+ -- vim.lsp.config.ts_ls = {
102+ -- cmd = { 'typescript-language-server', '--stdio' },
103+ -- filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' },
Cut short: this commit's diff is over 1000 lines.
nvim/lua/plugins/nvim-tree.lua+19−0
Cut short: this commit's diff is over 1000 lines.
nvim/lua/plugins/theme-sync.lua+28−0
Cut short: this commit's diff is over 1000 lines.
nvim/tests-issue.md+2−0
Cut short: this commit's diff is over 1000 lines.
opencode/AGENTS.md+0−21
Cut short: this commit's diff is over 1000 lines.
opencode/README.md+0−44
Cut short: this commit's diff is over 1000 lines.
opencode/agents/debug.md+0−359
Cut short: this commit's diff is over 1000 lines.
opencode/agents/plan.md+0−75
Cut short: this commit's diff is over 1000 lines.
opencode/agents/writer.md+0−49
Cut short: this commit's diff is over 1000 lines.
opencode/commands/commit-all.md+0−40
Cut short: this commit's diff is over 1000 lines.
opencode/commands/format-then-lint.md+0−23
Cut short: this commit's diff is over 1000 lines.
opencode/commands/review.md+0−145
Cut short: this commit's diff is over 1000 lines.
opencode/install.sh+0−37
Cut short: this commit's diff is over 1000 lines.
pi/install.sh+21−0
Cut short: this commit's diff is over 1000 lines.
pi/themes/0x96f-dark.json+87−0
Cut short: this commit's diff is over 1000 lines.
pi/themes/0x96f-light.json+87−0
Cut short: this commit's diff is over 1000 lines.
shell/bashrc+95−0
Cut short: this commit's diff is over 1000 lines.
shell/install.sh+13−11
Cut short: this commit's diff is over 1000 lines.
shell/shared.sh+9−6
Cut short: this commit's diff is over 1000 lines.
theme-switcher/alacritty-theme-switcher+64−0
Cut short: this commit's diff is over 1000 lines.
theme-switcher/alacritty-theme-switcher.service+11−0
Cut short: this commit's diff is over 1000 lines.
theme-switcher/install.sh+34−0
Cut short: this commit's diff is over 1000 lines.