diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-03-04 01:58:58 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-03-04 01:58:58 +0100 |
commit | 725c07dddebdd0c9505b25e25c8b358274ccbccf (patch) | |
tree | f8369c0ce8dbb5e1b6c7c70e286189bb932d357e /config/essentials/zsh | |
parent | 83b8149f4b3fb48a030c4d0186100a5dd9af0acc (diff) |
refactor
Diffstat (limited to 'config/essentials/zsh')
-rw-r--r-- | config/essentials/zsh/.zshrc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 56b7c0d..c5cec9f 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -116,16 +116,12 @@ bindkey -M menuselect '^xh' accept-and-hold # Hold bindkey -M menuselect '^xn' accept-and-infer-next-history # Next bindkey -M menuselect '^xu' undo # Undo -set_wt_action () { - print -n "\e]0;$1\a\033[0m" -} -add-zsh-hook -Uz preexec set_wt_action -set_wt () { - print -Pn "\e]0;%n@%m on %~\a" -} -add-zsh-hook -Uz precmd set_wt +## window title hooks +add-zsh-hook -Uz preexec () { print -n "\e]0;$1\a\033[0m"; } +add-zsh-hook -Uz precmd set_wt (){ print -Pn "\e]0;%n@%m on %~\a"; } + ## automatic ls after cd -add-zsh-hook -Uz chpwd (){[ "$PWD" != "$HOME" ] && ls -a; } +add-zsh-hook -Uz chpwd (){ [ "$PWD" = "$HOME" ] || ls -a; } ### Variables ## Run menuscripts with fzf |