diff --git a/src/content/git/auto-theme.nvim.mdx b/src/content/git/auto-theme.nvim.mdx index 863d7dd..caa1d02 100644 --- a/src/content/git/auto-theme.nvim.mdx +++ b/src/content/git/auto-theme.nvim.mdx @@ -72,7 +72,7 @@ Unfortunately, the following programs I've found nearly impossible to dynamicall 9. ripgrep: I use the default theme. The ripgrep global configuration file does not support environment variables, exterminating the option to provide a `${THEME}`-based path in the global configuration file. 10. zsh: it's impossible to update `$THEME` across all existing shells (simply a limit of posix). However, all affected _programs_ will read the proper `$THEME`--I'm fine compromising here. -### UPD: fzf, ripgrep, fzf-lua, and shell improvements 30/11/2025 +### upd: fzf, ripgrep, fzf-lua, and shell improvements 30/11/2025 After some _extreme_ amounts of finagling I'm now able to automatically update fzf and ripgrep themes both in the shell (after re-rendering the prompt\*) and in new fzf-lua instances. I consider this a 99% win. @@ -158,3 +158,12 @@ if -F '#{==:#{client_theme},light}' { # set light mode } ``` + +## upd: improve tmux theme updating 14/12/2025 + +The above config does not update the tmux theme in tandem with the system theme. I switched to sourcing a theme file (`$XDG_CONFIG_HOME/tmux/themes/{midnight,daylight}.conf`) and hooking into tmux's internal system theme (the `client-{light,dark}-theme` hook) as follows: + +```tmux +set-hook -g client-light-theme 'source $XDG_CONFIG_HOME/tmux/themes/daylight.conf' +set-hook -g client-dark-theme 'source $XDG_CONFIG_HOME/tmux/themes/midnight.conf' +```