From 623951fb948261c0dbe1f5b3881596bb509534b6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 27 Feb 2024 17:31:53 +0100 Subject: [zsh] added auto notify and keybind for autosuggestions --- config/essentials/zsh/.zshrc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 9b105e6..02d0ddf 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -32,15 +32,22 @@ eval "$(zoxide init zsh)" ### Plugins [ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh" +plug "MichaelAquilina/zsh-you-should-use" +plug "chivalryq/git-alias" plug "kutsan/zsh-system-clipboard" +# plug "marlonrichert/zsh-autocomplete" plug "xPMo/zsh-toggle-command-prefix" +plug "zap-zsh/fzf" plug "zap-zsh/vim" +plug "zdharma-continuum/fast-syntax-highlighting" plug "zsh-users/zsh-autosuggestions" plug "zsh-users/zsh-completions" -plug "zap-zsh/fzf" -plug "zdharma-continuum/fast-syntax-highlighting" plug "zsh-users/zsh-history-substring-search" -plug "MichaelAquilina/zsh-you-should-use" + +plug "MichaelAquilina/zsh-auto-notify" +export AUTO_NOTIFY_TITLE="zsh" +export AUTO_NOTIFY_BODY="%command [%exit_code]" +AUTO_NOTIFY_IGNORE+=("gurk") # Substring search settings export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold" @@ -92,6 +99,7 @@ bindkey "^Xa" _expand_alias bindkey "^Xe" edit-command-line bindkey "^[." insert-last-word bindkey "^['" quote-line +bindkey '\ea' autosuggest-toggle ## Move around using h j k l in completion menu zmodload zsh/complist bindkey -M menuselect 'h' vi-backward-char -- cgit v1.2.3 From 2102e1ed005293b73e105729cc404ee6557a0508 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 27 Feb 2024 17:33:46 +0100 Subject: [zsh] added surround_in_var in widgets.zsh --- config/essentials/zsh/.zshrc | 1 + config/essentials/zsh/widgets.zsh | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 config/essentials/zsh/widgets.zsh (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 02d0ddf..b9c1173 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -23,6 +23,7 @@ zle -N change-surround surround . $XDG_CONFIG_HOME/shell/functions.sh . $XDG_CONFIG_HOME/shell/aliases.sh . $XDG_CONFIG_HOME/zsh/comp.zsh +. $XDG_CONFIG_HOME/zsh/widgets.zsh # . $XDG_CONFIG_HOME/zsh/prompt.zsh # . $XDG_CONFIG_HOME/zsh/plugins.zsh diff --git a/config/essentials/zsh/widgets.zsh b/config/essentials/zsh/widgets.zsh new file mode 100644 index 0000000..e0cbf98 --- /dev/null +++ b/config/essentials/zsh/widgets.zsh @@ -0,0 +1,9 @@ +# surround line in variable +surround_in_var() +{ + BUFFER=" \$($BUFFER)" + zle beginning-of-line +} +zle -N surround_in_var +bindkey '\ev' surround_in_var + -- cgit v1.2.3 From a845f02e612696547fe2981bc987674e8058b419 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 27 Feb 2024 22:55:53 +0100 Subject: [zsh] added ignore for auto-notify and comments for profiling --- config/essentials/zsh/.zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index b9c1173..56b7c0d 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -1,5 +1,7 @@ #!/bin/zsh +# zmodload zsh/zprof + if [ "$(id -u)" -ne 0 ] then [ "${TTY%%tty*}" = '/dev/' ] && clear @@ -48,7 +50,7 @@ plug "zsh-users/zsh-history-substring-search" plug "MichaelAquilina/zsh-auto-notify" export AUTO_NOTIFY_TITLE="zsh" export AUTO_NOTIFY_BODY="%command [%exit_code]" -AUTO_NOTIFY_IGNORE+=("gurk") +AUTO_NOTIFY_IGNORE+=("gurk" "ttyper" "pulsemixer") # Substring search settings export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold" @@ -142,3 +144,5 @@ setopt histreduceblanks setopt interactivecomments setopt notify setopt cdablevars + +# zprof -- cgit v1.2.3