From 4005771984c77c200d957fe58b0678682279af14 Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Sat, 29 Apr 2023 19:53:37 +0200 Subject: [PATCH] feat(tmux): nicer window names --- install.sh | 3 ++- nvim/init.vim | 3 ++- tmux/tmux.conf | 8 ++++++++ zsh/zshrc | 6 ++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ad936c5..8280380 100755 --- a/install.sh +++ b/install.sh @@ -28,7 +28,8 @@ then tmux \ nodejs \ ripgrep \ - typos-bin + typos-bin \ + python-libtmux elif cat /etc/os-release | grep "Ubuntu" > /dev/null then echo "== ubuntu packages" diff --git a/nvim/init.vim b/nvim/init.vim index 27647d1..d90b630 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -145,7 +145,8 @@ require'nvim-treesitter.configs'.setup { "typescript", "vim", "yaml", - "glsl" + "glsl", + "glimmer", }, -- Install languages synchronously (only applied to `ensure_installed`) sync_install = false, diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 8dc44d4..50b5e3c 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -75,3 +75,11 @@ set-window-option -g clock-mode-style 24 set-option -g @prefix_highlight_fg 'colour255' set-option -g @prefix_highlight_bg 'colour75' set-option -g @prefix_highlight_copy_mode_attr 'fg=colour255,bg=colour176' + +# Plugins +if "test ! -d ~/.tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" + +set -g @plugin 'ofirgall/tmux-window-name' + +run '~/.tmux/plugins/tpm/tpm' diff --git a/zsh/zshrc b/zsh/zshrc index cf8413a..40639bc 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -55,6 +55,12 @@ export EDITOR=vim # Nix fix export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive +# Tmux nicer window name +tmux-window-name() { + ($TMUX_PLUGIN_MANAGER_PATH/tmux-window-name/scripts/rename_session_windows.py &) +} +add-zsh-hook chpwd tmux-window-name + # Starship export STARSHIP_CONFIG=~/.starship.toml eval "$(starship init zsh)"