Commit Graph

33 Commits

Author SHA1 Message Date
Anton Volnuhin
826a9417e7 kitty: make the theme mode per-machine
theme-mode is a per-machine preference, and the three *-theme.auto.conf
files are generated from it plus themes/, so tracking any of them made
every machine flag the others' choice. Drop all four from the source
state and ignore them.

That leaves a freshly applied machine with no theme files for kitty to
read, so add run_after_kitty-theme-mode.sh to regenerate them from the
canonical themes. It defaults to `auto`, so a new machine follows its OS
until told otherwise, and it exits quietly where this kitty config isn't
applied rather than failing the run.

Since that script now runs on every apply, including on Linux, make the
permission lookup in both shell scripts fall back from BSD `stat -f` to
GNU `stat -c` and then to 600.
2026-08-06 02:03:13 +03:00
Anton Volnuhin
f7baca7b3b kitty: pin the theme mode to dark
Captures the current mode. The two generated theme files now hold the
dark theme because the mode is pinned; themes/light.conf still has the
light theme, so `theme light` and `theme auto` restore it.
2026-08-06 01:59:12 +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
31d3048abe fix(kitty): restore per-host tab colors in the custom tab bar
a68b138 made draw_tab() derive all four color roles from tab_colors(),
so it stopped reading the per-tab colors that `kitten @ set-tab-color`
sets. The ssh wrapper (__kitty_tab_set) still set them, but the renderer
discarded them and every remote tab drew in the #2e84e6 accent.

Resolve the drawn colors through DrawData.tab_fg/tab_bg on the already
role-substituted title_draw_data: those return the per-tab override when
one is set and the accent roles otherwise. Theme-provided tab colors
still cannot leak in, so the theme-independence fix is preserved.

Extend tests/test_tab_bar_colors.py with the override case; it fails
against the old renderer (got the accent, wanted the host color).
2026-08-06 01:31:40 +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
0defab964d tab strategy + font size 15 2026-07-28 17:17:48 +03:00
Anton Volnuhin
9c339fb730 theme small changes and fixes 2026-07-28 04:57:07 +03:00
Anton Volnuhin
a68b138d38 fix(kitty): preserve tab styling across themes 2026-07-28 04:53:48 +03:00
Anton Volnuhin
a4eb8ae75d Sync Kitty automatic themes from maxwell 2026-07-27 22:44:57 +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
497cbce0c6 kitty: add ctrl+shift detach_window keybindings 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
b0dbb8e0b2 working shift+enter everywhere 2026-04-07 23:34:01 +03:00
Anton Volnuhin
4bab71f9ab dark kitten icon for kitty 2026-04-06 14:46:04 +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
8f39a3e419 template symlinks for portability, remove karabiner debug rule
- Template 1Password agent.sock symlink with chezmoi.homeDir
- Template kitty theme.conf symlink with chezmoi.homeDir
- Remove volumer experiment rule (volume_up mapped to 'a')
- Remove machine-specific USB location_id from volumer device

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:25:40 +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
e838936be2 back to kitty, uv, small changes in karabiner 2025-03-02 01:17:58 +03:00
Anton Volnuhin
7d36b2f476 cmd+d for dataspell and j -> jupyter 2024-03-03 03:18:12 +03:00
Anton Volnuhin
a066b973e1 fix tab_bar: explicit conversion of background color to int 2023-12-01 00:40:15 +03:00
Anton Volnuhin
a5e2c00d1a nvim fixes after some updates 2023-12-01 00:09:18 +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
f868c07ea2 treesitter incremental selection, formatting, charlist updates 2023-05-21 09:38:57 +03:00
Anton Volnuhin
ed90582317 re-adding themes 2023-05-09 20:45:56 +03:00
Anton Volnuhin
82f8ff3654 scrollback buffer now works via nvim; fish_variables removed from config 2023-05-08 15:52:32 +03:00
Anton Volnuhin
7f5cedd473 no more DS_Store, even in kitty 2023-05-08 05:22:11 +03:00
Anton Volnuhin
8fe4e72dea cleanup 2023-05-08 05:18:28 +03:00
Anton Volnuhin
bfe2bcb3c9 Initial commit 2023-04-30 01:21:51 +03:00