mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-12 03:52:25 +00:00
fix(shell): run tmux hook only if tmux is active
This commit is contained in:
18
base/zshrc
18
base/zshrc
@@ -85,14 +85,18 @@ x-have rbenv && {
|
|||||||
eval "$(rbenv init - zsh)"
|
eval "$(rbenv init - zsh)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Autoupdate tmux window name
|
# Run only if tmux is active
|
||||||
TMUX_WINDOW_NAME_PLUGIN="$DOTFILES/config/tmux/plugins/tmux-window-name/scripts/rename_session_windows.py"
|
[[ -n "$TMUX" ]] && {
|
||||||
[ -f "$TMUX_WINDOW_NAME_PLUGIN" ] && {
|
# Autoupdate tmux window name
|
||||||
tmux-window-name()
|
TMUX_WINDOW_NAME_PLUGIN="$DOTFILES/config/tmux/plugins/tmux-window-name/scripts/rename_session_windows.py"
|
||||||
{
|
[ -f "$TMUX_WINDOW_NAME_PLUGIN" ] && {
|
||||||
($TMUX_WINDOW_NAME_PLUGIN &)
|
tmux-window-name()
|
||||||
|
{
|
||||||
|
($TMUX_WINDOW_NAME_PLUGIN &)
|
||||||
|
}
|
||||||
|
add-zsh-hook chpwd tmux-window-name
|
||||||
|
tmux-window-name
|
||||||
}
|
}
|
||||||
add-zsh-hook chpwd tmux-window-name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# eval "$(starship init zsh)"
|
# eval "$(starship init zsh)"
|
||||||
|
|||||||
Reference in New Issue
Block a user