diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-06-24 13:37:46 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-06-24 13:37:46 +0200 |
| commit | f9e07eb3b708c91ad6a3c97978a0491af9c017d7 (patch) | |
| tree | ad60f3f24d3c41546d2f6d478fa2dc01d20ed71c /.config/zsh | |
| parent | 33d3d5e25a8ae8239a2db9ac076c4326d0997216 (diff) | |
| download | dotfiles-f9e07eb3b708c91ad6a3c97978a0491af9c017d7.tar.gz dotfiles-f9e07eb3b708c91ad6a3c97978a0491af9c017d7.zip | |
Commented out nvim-listener to test better performance
Diffstat (limited to '.config/zsh')
| -rw-r--r-- | .config/zsh/.zshrc | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index e1a2521..133d581 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -225,39 +225,39 @@ TRAPWINCH() { # Trap the WINCH signal to update the mode file on window size cha update-mode-file } -function nvim-listener() { - local prev_nvim_status="inactive" - local nvim_pid="" - while true; do - local current_nvim_pid=$(pgrep -x "nvim") - if [[ -n "$current_nvim_pid" && "$current_nvim_pid" != "$nvim_pid" ]]; then - # Neovim started - prev_nvim_status="active" - nvim_pid="$current_nvim_pid" - VI_MODE="" # Clear VI_MODE to show Neovim mode - update-mode-file - if command -v tmux &>/dev/null && [[ -n "$TMUX" ]]; then - tmux refresh-client -S - fi - elif [[ -z "$current_nvim_pid" && "$prev_nvim_status" == "active" ]]; then - # Neovim stopped - prev_nvim_status="inactive" - nvim_pid="" - if [[ ${KEYMAP} == vicmd || ${KEYMAP} == vi-cmd-mode ]]; then - VI_MODE=$(normal-mode) - elif [[ ${KEYMAP} == main || ${KEYMAP} == viins || ${KEYMAP} == '' ]]; then - VI_MODE=$(insert-mode) - fi - update-mode-file - if command -v tmux &>/dev/null && [[ -n "$TMUX" ]]; then - tmux refresh-client -S - fi - fi - done -} +#function nvim-listener() { +# local prev_nvim_status="inactive" +# local nvim_pid="" +# while true; do +# local current_nvim_pid=$(pgrep -x "nvim") +# if [[ -n "$current_nvim_pid" && "$current_nvim_pid" != "$nvim_pid" ]]; then +# # Neovim started +# prev_nvim_status="active" +# nvim_pid="$current_nvim_pid" +# VI_MODE="" # Clear VI_MODE to show Neovim mode +# update-mode-file +# if command -v tmux &>/dev/null && [[ -n "$TMUX" ]]; then +# tmux refresh-client -S +# fi +# elif [[ -z "$current_nvim_pid" && "$prev_nvim_status" == "active" ]]; then +# # Neovim stopped +# prev_nvim_status="inactive" +# nvim_pid="" +# if [[ ${KEYMAP} == vicmd || ${KEYMAP} == vi-cmd-mode ]]; then +# VI_MODE=$(normal-mode) +# elif [[ ${KEYMAP} == main || ${KEYMAP} == viins || ${KEYMAP} == '' ]]; then +# VI_MODE=$(insert-mode) +# fi +# update-mode-file +# if command -v tmux &>/dev/null && [[ -n "$TMUX" ]]; then +# tmux refresh-client -S +# fi +# fi +# done +#} # Start Neovim listener in the background -nvim-listener &! +#nvim-listener &! set-prompt RPROMPT='%(?..[%F{196}%?%f] )' |
