Commit Graph

86 Commits

Author SHA1 Message Date
Anton Volnuhin
e5207ac154 tide: derive the light segment background from the terminal's own
A fixed E4E4E4 segment was 1.04:1 against Kaolin Breeze's EBE8E4 -- an
invisible pill -- and a neutral grey reads as a foreign object on a warm
or cool background anyway. Read the background kitty is showing and place
the segment a fixed contrast step below it, so it keeps the theme's tint.
Default step is 1.12:1; __tide_terminal_segment_contrast overrides it.

Moving the segment invalidates the foregrounds, which are authored at
exactly 4.5:1 against E4E4E4 with no headroom, so re-aim them at the
derived segment by the single ratio the palette's shared luminance ceiling
moved by. That scaling runs in linear light, where luminance is a weighted
sum of the channels and so scales exactly; scaling the encoded channels
drifts further the darker a color gets, which is where the floor binds.

Also fix the baseline capture: the overrides are exported, so a Fish
started from a Fish that had already applied a palette was capturing that
palette as its dark baseline and could never restore dark. Drop inherited
globals first so the baseline comes from the universal scope Tide writes.

Dark mode is unchanged.
2026-08-06 15:34:51 +03:00
Anton Volnuhin
ccf4a18c86 kitty: match any prefix of the themes kitten, not just "themes"
`kitten theme` runs the themes kitten -- kitty accepts unambiguous prefixes
-- but the shim tested `$argv[1] = themes` exactly, so that spelling skipped
the capture and re-apply entirely. Before the theme-mode work that was
harmless, since nothing rewrote the automatic theme files; now the next
regeneration reverts whatever was just chosen, which is why picking a theme
stopped sticking.

Accept any prefix of "themes" at least two characters long. Verified that
themes/theme/them/th all trigger and icat still does not.
2026-08-06 05:04:05 +03:00
Anton Volnuhin
9e2667f8fe kitty: capture theme choices however the kitten was launched
Saving a theme stopped sticking: the choice was captured only by the fish
`kitten` wrapper, so `kitty +kitten themes`, a keybinding or any non-fish
shell wrote <appearance>-theme.auto.conf directly and the next regeneration
overwrote it from theme-modes. The dark slot had already lost a pick that
way -- dark-theme.auto.conf held #0d0f31 while canonical dark said #2b2c2e.

Move the capture into apply-theme-mode.sh, which every path runs. It records
a cksum of each generated file after the repair step; on the next run a file
whose checksum differs was written by something else, so it becomes canonical
for that appearance. With no state recorded yet nothing is adopted, so a
first run cannot mistake a pinned mode's duplicated files for real choices.

The fish wrapper keeps only its useful part: re-apply the mode and reload so
the change shows at once.

theme-modes/dark.conf is the recovered #0d0f31 (1984). Covered by a new case
in tests/test_theme_mode.sh that writes the theme file with no shell involved.
2026-08-06 04:42:59 +03:00
Anton Volnuhin
af05b9e245 ping: check IPv6 is actually usable, and split ping4 per platform
The ping wrapper only asked whether the *target* had an AAAA record, never
whether this machine could reach over IPv6, so `ping ya.ru` ran ping6 and
died with "No route to host" while IPv4 worked fine.

Checking for a default v6 route is not sufficient either: this Mac has one
while holding only ::1 and fe80:: link-locals. So require a global unicast
address (2000::/3) as well as the route, which is the condition that
actually fails here.

ping4 is now platform-split rather than branching internally, since macOS
ping rejects -4:
  macOS  ~/.local/bin/ping (wrapper) and ~/.local/bin/ping4 -> /sbin/ping
  Linux  a fish function running `ping -4`
.chezmoiignore gates each side so neither lands where it cannot work.
2026-08-06 03:38:12 +03:00
Anton Volnuhin
1c4e3774cf kitty: put the grok themes in the picker, move the mode store aside
`kitten themes` treats every .conf in <config-dir>/themes as a user
theme, which the mode system's canonical store was sitting in -- so the
picker was offering three bogus entries named light, dark and
no-preference, and had been since that store was introduced.

Move the store to ./theme-modes so ./themes means only what the kitten
means by it, and repoint apply-theme-mode.sh, the kitten shim, the
run_after hook and the test at the new path.

GrokNight and GrokDay move into ./themes with the ## name/author/
license/upstream/blurb header the kitten reads, so they now show up in
`kitten themes` and `--dump-theme` resolves them.

theme-modes/dark.conf carries the #202020 theme that was already on
disk: the file had to be re-added at its new path, so that drift comes
along with it.
2026-08-06 03:24:48 +03:00
Anton Volnuhin
addce489b4 kitty: remember the light/dark mode across restarts
kitty gives *-theme.auto.conf priority over everything -- includes and
even --override -- and has no option to stop following the OS. So the
only way to start in a chosen mode is to control what those files
contain. Make them generated:

  themes/{light,dark,no-preference}.conf  canonical, the real themes
  theme-mode                              auto | light | dark
  apply-theme-mode.sh                      writes the three .auto.conf

Under `auto` each appearance keeps its own theme, so kitty follows the
OS as before. Pinned, all three get the pinned theme, so kitty starts in
it whatever the OS says and a config reload no longer resets it.

`theme` now records the mode and reloads instead of calling set-colors,
which is why the setting survives restarts. A bare `theme` records
`auto` rather than pinning when the toggle lands on the macOS
appearance, so nothing is pinned unless it actually differs.

The kitten shim hashes the automatic theme files before running `kitten
themes` and copies whichever changed into themes/, so picking a new
light theme while pinned to dark is kept and applied on the next switch.
Covered by tests/test_theme_mode.sh.

conf.d/kitty_theme.fish is gone: theme-mode is now the source of truth,
so the universal-variable tracker it maintained is redundant.
2026-08-06 01:49:45 +03:00
Anton Volnuhin
f66ee4d845 kitty: give active ssh tabs the same foreground as every other tab
__kitty_tab_set sent a luminance-picked black/white active_fg, so a
tinted tab's title looked different from a normal one. Send NONE
instead: tab_fg() then falls back to the shared active foreground (the
theme background) while active_bg keeps the per-host tint.

Covered by a new case in tests/test_tab_bar_colors.py matching what
__kitty_tab_set actually sends — host background, no fg override.
2026-08-06 01:35:25 +03:00
Anton Volnuhin
739e906080 fish: only read the keychain PAT on systems that have security
The bare command substitution ran on every shell start regardless of
platform, so Linux/WSL printed "fish: Unknown command: security" at
login — the 2>/dev/null only redirects the command's own stderr, not
fish's command-not-found diagnostic.

Guard with `type -q security`, matching conf.d/codex-github-mcp.fish,
and skip the export when the lookup returns nothing so a missing
keychain item no longer exports an empty GITHUB_PERSONAL_ACCESS_TOKEN.
2026-08-06 01:23:07 +03:00
Anton Volnuhin
384bfe57b3 fish: add theme command to toggle kitty light/dark
`theme` switches kitty between the existing dark-theme.auto.conf and
light-theme.auto.conf via `kitty @ set-colors --all --configured`, so it
stays in sync with whatever `kitten themes --light/--dark` selects.
Subcommands: light, dark, auto (hand control back to the OS appearance
via load-config), status.

Tide is resynced by calling __tide_apply_terminal_appearance directly,
so the prompt recolors even if kitty sends no palette-change
notification for a dynamic color change. conf.d/kitty_theme.fish tracks
$fish_terminal_color_theme into $kitty_theme_mode so the toggle still
reads the real state after kitty follows an OS appearance change.

light-theme.auto.conf had no tab colors, which left the dark tab bar on
a light background after switching; add a matching tab style block.
2026-08-06 01:15:47 +03:00
Anton Volnuhin
a68b138d38 fix(kitty): preserve tab styling across themes 2026-07-28 04:53:48 +03:00
Anton Volnuhin
296bd3af80 Small combined changes 2026-07-27 20:23:32 +03:00
Anton Volnuhin
73176c2bfb fish, kitty: follow terminal light theme 2026-07-27 20:20:38 +03:00
Anton Volnuhin
e3c9f4edd5 fish: smarter SSH_AUTH_SOCK refresh, reading tmux session env over stale global 2026-06-12 01:25:16 +03:00
Anton Volnuhin
fdc149e9ec small updates to tabs, agy 2026-05-22 03:11:32 +03:00
Anton Volnuhin
1590a272aa kitty: color terminal tabs by ssh/mosh host
Tint the kitty tab background by target host so local vs remote (and
which remote) is visible at a glance.

- __kitty_host_color: explicit color table for known hosts (routers,
  resolvers, ryzen/mini, personal cloud, geo VPS) + stable hashed
  palette fallback; auto-picks readable fg by luminance
- __kitty_ssh_host: parse target host from ssh/mosh-style argv
- __kitty_tab_set/__kitty_tab_reset: active tab = full host-color bg,
  inactive tab = dark theme bg with host-color text; revert on exit
- ssh wrapper + s (kitten ssh) and m (mosh) wired to tint/reset

Also includes unrelated pending dotfile changes (GH MCP PAT from
keychain in fish/zsh, kitty/wezterm font_size 15->14, kitty
colorspace displayp3) committed together at user request.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 23:08:32 +03:00
Anton Volnuhin
fe835de7f1 double kitty integration fix -> no more brick cursor bug after switching to kitty and back 2026-04-10 15:11:30 +03:00
Anton Volnuhin
de32b5f5d6 m for mosh and s for ssh, both with second arg for tmux session 2026-04-09 02:24:45 +03:00
Anton Volnuhin
10c759e3a9 kitty fish to chezmoi 2026-04-07 23:56:28 +03:00
Anton Volnuhin
83e26550d0 wrong cursor stuff fix 2026-04-07 23:52:35 +03:00
Anton Volnuhin
5274042036 experimental fish cursor fixes 2026-04-07 23:39:17 +03:00
Anton Volnuhin
bfafb03296 switch tide to plttn/tide@v7, as my fix was merged in there 2026-04-05 19:42:28 +03:00
Anton Volnuhin
118666409d new tide config, cmd+N for kitty, slightly bigger font in kitty 2026-04-05 19:36:34 +03:00
Anton Volnuhin
fe659f4386 mosh wrapper for kitty with forked mosh 2026-03-31 01:04:13 +03:00
Anton Volnuhin
1fccc1e05e tmux configuration update for colors, copy and shift-enter 2026-03-28 13:25:59 +03:00
Anton Volnuhin
ce547fe18d skip atuin init when encryption key is missing or empty
Prevents panic on fresh installs where atuin has no key yet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:46:16 +03:00
Anton Volnuhin
95c88c3ce1 add tide-reset function, fix treesitter config for stable nvim
Extract tide configuration into a reusable fish function (tide-reset)
and call it from the chezmoi onchange script. Also revert treesitter
config to the stable API (nvim-treesitter.configs).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 18:13:21 +03:00
Anton Volnuhin
dfdd5b7dae fix Tide context in OrbStack: set SSH_TTY when SSH_CONNECTION is present
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 23:39:59 +03:00
Anton Volnuhin
7045d9127a fix kitty detection in ssh wrapper function
Kitty doesn't set TERM_PROGRAM, check TERM=xterm-kitty instead.
Also use modern `kitten ssh` command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:56:02 +03:00
Anton Volnuhin
0fed059f7f switch to forked tide prompt, fix right prompt item removal
- Use antonme/tide fork (from plttn/tide v7) which includes fix for
  bold leaking from home directory pwd rendering
- Replace fragile index-based tide_right_prompt_items removal with
  explicit name-based filtering of node, gcloud, and kubectl

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:00:42 +03:00
Anton Volnuhin
44ddaefee5 restructure repo, fix fish config, remove vendored repos
Phase 4 (fish config):
- Fix ip function: replace load-time `which` with `command ip` wrapper
- Fix 1Password socket: use -S (socket test) instead of -f, export with -gx
- Remove deprecated fish plugins: github-copilot-cli, pisces

Phase 5 (repo structure):
- Move tpm and kitty-themes to .chezmoiexternal.toml (git-repo externals)
- Delete unused tmux-mighty-scroll (not referenced in tmux.conf)
- Expand .chezmoiignore: karabiner macOS-only, skip auto-backups/__pycache__
- Remove orphans: duplicate xterm-kitty, empty ssh.conf, karabiner backups
- Remove kitty.fish from tracking (auto-generated by kitty)

Phase 6 (terminal config):
- Comment out debug print in kitty tab_bar.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:11:10 +03:00
Anton Volnuhin
dfb97eb1d0 sync live config changes into chezmoi source
Re-add live edits:
- fish: gpt-5.2 model, llm.py, rewritten s/icat with ghostty support,
  new ils function, bass plugin, removed copilot-cli plugin
- karabiner: ghostty/moonlight/rdp apps, new caps rules, opt-W shortcut
- kitty: cursor_trail, font_size 14.5
- nvim: removed auto-session-nvim-tree, auto-session config update
- wezterm: scrollback 1M, border_top 2cell
- tmux-nova: local nerdfonts rendering patches
- zshrc: track file, includes LM Studio PATH

Also fix: chezmoi template error on macOS (osRelease.id without linux guard)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 18:40:51 +03:00
Anton Volnuhin
f03b8e90b2 merge live config.fish changes, fix chezmoi template on macOS
- pull live local changes: gpt-5.2 model, llm.py, rewritten s/icat/ils
  functions with ghostty support, antigravity path
- re-apply our improvements on top: fish_add_path, guards, hardcoded
  path fixes, micromamba removal
- fix osRelease.id template error on macOS (wrap ncurses block in linux check)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 18:38:51 +03:00
Anton Volnuhin
ac46863b48 harden install script and fix fish config portability
Install script:
- fix package availability (skim/fedora, fd-find/debian, direnv+goku/macos)
- add CLI flags for non-interactive mode (--skip-timezone, --skip-neovim-bootstrap, etc.)
- template STEPS count per OS for correct TUI layout
- add brew shellenv for fresh Apple Silicon, timeout portability
- pam_ssh_agent_auth availability check with warning for Fedora 42+
- fix fisher detection, authorized_keys whole-line dedup

Fish config:
- replace set -gx PATH with idempotent fish_add_path
- guard direnv/cargo sourcing for missing tools
- fix hardcoded /home/anton/ and /Users/anton/ paths
- remove unused micromamba/conda setup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-02 18:35:11 +03:00
Anton Volnuhin
e838936be2 back to kitty, uv, small changes in karabiner 2025-03-02 01:17:58 +03:00
Anton Volnuhin
6c113fb3bf colored ip 2024-05-21 20:03:58 +03:00
Anton Volnuhin
68c0238eaf experiment to move everything before -> after 2024-05-21 01:52:52 +03:00
Anton Volnuhin
39d3816381 micro fixes for bat and z 2024-05-21 01:20:13 +03:00
Anton Volnuhin
264c7cd7a7 update tide prompt to v6 2024-05-21 01:17:29 +03:00
Anton Volnuhin
88ece234d4 vim mode for fish 2024-05-17 22:37:25 +03:00
Anton Volnuhin
92d779e991 fox error on non/macs 2024-05-13 00:02:06 +03:00
Anton Volnuhin
9d409c06ea sgpt minor fixes 2024-05-11 21:27:34 +03:00
Anton Volnuhin
8bf61f23f3 wezterm mostly 2024-05-11 15:23:35 +03:00
Anton Volnuhin
beda2f7ab1 webui to karabiner and direnv to fish 2024-03-09 04:11:25 +03:00
Anton Volnuhin
4649431b95 bard->gemini, bing->copilot 2024-02-20 06:14:44 +03:00
Anton Volnuhin
feb9aac2d4 fix for 1password plugins on non-macs 2023-11-30 23:43:04 +03:00
Anton Volnuhin
7ab907c786 times are a changing 2023-11-30 23:22:20 +03:00
Anton Volnuhin
151924c592 Some changes again 2023-08-02 04:46:05 +03:00
Anton Volnuhin
de54777883 fish something 2023-08-02 04:45:18 +03:00
Anton Volnuhin
14bc877d74 gix SSH auth 2023-06-01 16:45:42 +03:00
Anton Volnuhin
cb351314f5 remote sudo 2023-06-01 13:00:51 +03:00