From 1c8b6f02dabbf104378a352e2928f7ebf64d7d72 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 13 Nov 2024 11:15:40 +0100 Subject: [PATCH 1/7] zsh: fix AUTO_NOTIFY_IGNORE --- .gitmodules | 0 common/.config/zsh/config/plugins.zsh | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000 diff --git a/common/.config/zsh/config/plugins.zsh b/common/.config/zsh/config/plugins.zsh index 43892d53..1e9bf29b 100644 --- a/common/.config/zsh/config/plugins.zsh +++ b/common/.config/zsh/config/plugins.zsh @@ -33,7 +33,25 @@ zsnippet https://raw.githubusercontent.com/python-virtualenvwrapper/virtualenvwr # NOTE: notify on long running commands turbo zload MichaelAquilina/zsh-auto-notify -AUTO_NOTIFY_IGNORE+=("lf" "lazygit" "elia") +AUTO_NOTIFY_IGNORE+=( + vim + nvim + less + more + man + tig + watch + git + commit + top + htop + ssh + nano + lf + lazygit + elia + gunicorn +) # NOTE: colorize help output turbo From 9b65ff1b45bcefb6b0fb4414c18114406263bbff Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 13 Nov 2024 11:30:02 +0100 Subject: [PATCH 2/7] zsh: add fzf completions and bindings --- common/.config/zsh/config/plugins.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/.config/zsh/config/plugins.zsh b/common/.config/zsh/config/plugins.zsh index 1e9bf29b..51335492 100644 --- a/common/.config/zsh/config/plugins.zsh +++ b/common/.config/zsh/config/plugins.zsh @@ -78,6 +78,11 @@ zload "software/tralios-kube" turbo as:"completion" from:"gitlab.tralios.de" pick:"_kube" zload "software/tralios-kube" +# NOTE: fzf bindings and completions +turbo multisrc"shell/{completion,key-bindings}.zsh" \ + id-as"junegunn/fzf_completions" pick"/dev/null" + zload junegunn/fzf + # NOTE: fzf completion menu turbo zload Aloxaf/fzf-tab From 1d0b78f68d961bccb7a0ccf08942e71f329213fe Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 13 Nov 2024 11:30:13 +0100 Subject: [PATCH 3/7] nvim: fix ruff lsp --- common/.config/nvim/lua/config/options.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/common/.config/nvim/lua/config/options.lua b/common/.config/nvim/lua/config/options.lua index dbe262a4..c9559dfa 100644 --- a/common/.config/nvim/lua/config/options.lua +++ b/common/.config/nvim/lua/config/options.lua @@ -12,4 +12,3 @@ o.conceallevel = 0 g.lazyvim_php_lsp = "intelephense" g.lazyvim_python_lsp = "basedpyright" -g.lazyvim_python_ruff = "ruff_lsp" From 30309df553f2ca236c5de603f0f7ce178f3e47d1 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 13 Nov 2024 15:26:56 +0100 Subject: [PATCH 4/7] zsh: fix lazygit widget --- common/.config/zsh/config/widgets.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/.config/zsh/config/widgets.zsh b/common/.config/zsh/config/widgets.zsh index a5da5dda..296fdb72 100644 --- a/common/.config/zsh/config/widgets.zsh +++ b/common/.config/zsh/config/widgets.zsh @@ -87,8 +87,8 @@ function lf-wrap() { zle -N lf-wrap function lazygit-wrap() { - [ ! -d "$(pwd)/.git" ] && [[ $(read -erk "?Not in a git repository. Create a new git repository? (y/n): ") =~ ^[Yy]$ ]] && git init - [ -d "$(pwd)/.git" ] && lazygit -p "$(pwd)" + [ ! -d "${PWD}/.git" ] && [[ $(read -erk "?Not in a git repository. Create a new git repository? (y/n): ") =~ ^[Yy]$ ]] && git init "$PWD" + [ -d "${PWD}/.git" ] && lazygit -p "$PWD" reset_prompt } zle -N lazygit-wrap From 92c4fed0b54af4deca3aa3bc4c622c2c6b871b27 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 13 Nov 2024 15:27:03 +0100 Subject: [PATCH 5/7] zsh: ignore kube in autonotify --- common/.config/zsh/config/plugins.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/common/.config/zsh/config/plugins.zsh b/common/.config/zsh/config/plugins.zsh index 51335492..c4cab8a1 100644 --- a/common/.config/zsh/config/plugins.zsh +++ b/common/.config/zsh/config/plugins.zsh @@ -51,6 +51,7 @@ AUTO_NOTIFY_IGNORE+=( lazygit elia gunicorn + kube ) # NOTE: colorize help output From 193c737232d7b7bbb141b7b8f3d076fdb6f3d162 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 13 Nov 2024 18:30:29 +0100 Subject: [PATCH 6/7] zsh: add hosthost function --- common/.config/zsh/config/functions.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/.config/zsh/config/functions.zsh b/common/.config/zsh/config/functions.zsh index 98f36e44..dd719739 100644 --- a/common/.config/zsh/config/functions.zsh +++ b/common/.config/zsh/config/functions.zsh @@ -14,6 +14,16 @@ function xsi() { } function whed() { + local script script=$(which "$1") [ -e "$script" ] && $EDITOR $(which "$script") } + +function hosthost() { + local ip + ip=$( + host -t A "$1" | awk '{print $4}' || + host -t AAAA "$1" | awk '{print $5}' + ) + host "$ip" | awk '{print $5}' | sed 's/.$//' +} From 79185813fde50119f1acb5e6795c3b2da20197a0 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 13 Nov 2024 18:30:37 +0100 Subject: [PATCH 7/7] nvim: update spell list --- common/.config/nvim/spell/en.utf-8.add | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/.config/nvim/spell/en.utf-8.add b/common/.config/nvim/spell/en.utf-8.add index ad285ccb..367e70b4 100644 --- a/common/.config/nvim/spell/en.utf-8.add +++ b/common/.config/nvim/spell/en.utf-8.add @@ -16,3 +16,5 @@ ZSH zsh zshrc hostname +JSON +scrypt