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/widgets.zsh | |
parent | 156db94321161105f5522d621d48de77d1a46857 (diff) |
checkpoint
Diffstat (limited to 'config/essentials/zsh/widgets.zsh')
-rw-r--r-- | config/essentials/zsh/widgets.zsh | 15 |
1 files changed, 15 insertions, 0 deletions
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" + |