Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tmux/.config/tmux/project-accent.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
# Switching themes: parameterize the new theme's pills with #{@accent} the same
# way (see tokyonight_moon.tmux) — that is all this feature needs from a theme.

# Apply the project color whenever a session is created...
set-hook -g session-created 'run-shell "~/.config/tmux/scripts/project-accent.sh #{hook_session}"'
# Apply the project color whenever a session is created. Background the hook
# (-b) so it stays off tmux's command-queue critical path: a foreground
# run-shell here blocks the server while tmuxinator spawns a project's panes,
# adding shell-startup contention. The script's own `refresh-client -S` still
# paints the accent right away, so backgrounding costs no immediacy.
set-hook -g session-created 'run-shell -b "~/.config/tmux/scripts/project-accent.sh #{hook_session}"'

# ...and backfill any sessions that already exist when this file is (re)sourced.
run-shell "~/.config/tmux/scripts/project-accent.sh"
Loading