diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-11-02 22:34:00 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-11-02 22:34:00 +0100 |
commit | ddbb985e96c9bb76dd7844654d4175be3cd65d45 (patch) | |
tree | 2b7b08958ae82bff667a5492226f8b8a4440aa18 /config/essentials/zsh | |
parent | 156db94321161105f5522d621d48de77d1a46857 (diff) |
checkpoint
Diffstat (limited to 'config/essentials/zsh')
-rw-r--r-- | config/essentials/zsh/.zshrc | 9 | ||||
-rw-r--r-- | config/essentials/zsh/comp.zsh | 1 | ||||
-rw-r--r-- | config/essentials/zsh/prompt.zsh | 2 | ||||
-rw-r--r-- | config/essentials/zsh/widgets.zsh | 15 |
4 files changed, 18 insertions, 9 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index e474366..85f213d 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -115,14 +115,7 @@ 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; } - -bottom_margin() { - TBUFFER="$BUFFER" - BUFFER="\n\n\n" - BUFFER="\n\n\n $TBUFFER" -} -add-zsh-hook -Uz precmd bottom_margin +# add-zsh-hook -Uz chpwd (){ [ "$PWD" = "$HOME" ] || ls -A; } ### Variables ## Run menuscripts with fzf diff --git a/config/essentials/zsh/comp.zsh b/config/essentials/zsh/comp.zsh index f0af913..7a53337 100644 --- a/config/essentials/zsh/comp.zsh +++ b/config/essentials/zsh/comp.zsh @@ -88,3 +88,4 @@ compdef _gnu_generic air compdef _go_flag_complete wbr compdef esc="which" compdef gdbcore="which" +compdef pkgfile="which" diff --git a/config/essentials/zsh/prompt.zsh b/config/essentials/zsh/prompt.zsh index 5364401..bf272b8 100644 --- a/config/essentials/zsh/prompt.zsh +++ b/config/essentials/zsh/prompt.zsh @@ -13,4 +13,4 @@ parse_git_branch() { } parse_git_status() { git status --short 2> /dev/null | head -n1 | awk '{print $1 " "}' -}
\ No newline at end of file +} diff --git a/config/essentials/zsh/widgets.zsh b/config/essentials/zsh/widgets.zsh index 71d33cf..985ad2b 100644 --- a/config/essentials/zsh/widgets.zsh +++ b/config/essentials/zsh/widgets.zsh @@ -14,4 +14,19 @@ insert-last-command-output() { zle -N insert-last-command-output bindkey "^Xl" insert-last-command-output + +toggle_prompt() { + local new_prompt=' $ ' + if [ "$PS1" = "$new_prompt" ]; then + eval "$(starship init zsh)" + else + PS1="$new_prompt" + fi + zle clear-screen +} +zle -N toggle_prompt +bindkey '\ep' toggle_prompt + + bindkey -s "^f" "tmux-sessionizer\n" + |