1
0
Fork 0

zsh: more plugins and configuration

This commit is contained in:
Luca Bilke 2024-11-11 21:54:02 +01:00
parent 0cb70c2c61
commit d1875737ec
No known key found for this signature in database
GPG Key ID: C9E851809C1A5BDE
6 changed files with 30 additions and 16 deletions

View File

@ -1,5 +1,3 @@
set +a
export EDITOR="nvim"
export TERMINAL="st"
export TERMCMD="$TERMINAL"
@ -34,6 +32,10 @@ export FZF_DEFAULT_OPTS="\
--color=info:#7aa2f7,prompt:#7dcfff,pointer:#7dcfff \
--color=marker:#9ece6a,spinner:#9ece6a,header:#9ece6a \
"
export AUTO_NOTIFY_THRESHOLD=15
export AUTO_NOTIFY_EXPIRE_TIME=5000
export AUTO_NOTIFY_TITLE="Command finished execution"
export AUTO_NOTIFY_BODY="%command\nDuration: %elapsed seconds\nExit code: %exit_code"
export ANSIBLE_NOCOWS="1" # Stop those fucking cows in Ansible
export LESS="-R"
export LESSOPEN="| /usr/bin/bat -f %s 2>/dev/null"
@ -80,8 +82,8 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_STATE_HOME="$HOME/.local/state"
set -a; source "$XDG_CONFIG_HOME/user-dirs.dirs"; set +a
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
set -a; source $XDG_CONFIG_HOME/user-dirs.dirs; set +a
export ANDROID_HOME="$XDG_DATA_HOME/android"
export ANSIBLE_GALAXY_CACHE_DIR="$XDG_CACHE_HOME/ansible/galaxy"
export ANSIBLE_GALAXY_TOKEN_PATH="$XDG_DATA_HOME/ansible/galaxy_token"

View File

@ -24,7 +24,7 @@ alias \
ffmpeg="ffmpeg -hide_banner" \
nvidia-settings="nvidia-settings --config=\$XDG_CONFIG_HOME/nvidia/settings" \
less="less -r" \
date="date +'%X %x'"
today="date +'%X %x'"
# Shortening
alias \

View File

@ -51,6 +51,7 @@ global_keybinds=(
"$key_info[Control]G" lazygit-wrap
"$key_info[Control]S" toggle-fzf-tab
"$key_info[Control]Z" fancy-ctrl-z
"$key_info[Control]J" jq-complete
)
local -A viins_keybinds

View File

@ -13,14 +13,6 @@ function xsi() {
--preview-window=right:66%:wrap | xargs -ro xi
}
function ntfy() {
"$@" && {
notify-send "$1 completed successfully"
return
}
notify-send -u critical "$1 failed! " "exited with code: $?"
}
function whed() {
script=$(which "$1")
[ -e "$script" ] && $EDITOR $(which "$script")

View File

@ -27,22 +27,39 @@ function zsnippet() {
turbo
zsnippet https://raw.githubusercontent.com/python-virtualenvwrapper/virtualenvwrapper/refs/heads/main/virtualenvwrapper.sh
# NOTE: fzf completion menu
# NOTE: notify on long running commands
turbo
zload Aloxaf/fzf-tab
zload MichaelAquilina/zsh-auto-notify
# NOTE: prox
# NOTE: colorize help output
turbo
zload Freed-Wu/zsh-help
# NOTE: jq repl
turbo
zload reegnz/jq-zsh-plugin
# NOTE: yank to clipboard
turbo
zload zsh-vi-more/evil-registers
zstyle :zle:evil-registers:'[A-Za-z%#]' editor nvim
# NOTE: tralios prox
turbo as:"program" from:"gitlab.tralios.de" pick:"prox"
zload "software/tralios-prox"
turbo as:"completion" from:"gitlab.tralios.de" pick:"_prox"
zload "software/tralios-prox"
# NOTE: kube program
# NOTE: tralios kube
turbo as:"program" from:"gitlab.tralios.de" pick:"kube"
zload "software/tralios-kube"
turbo as:"completion" from:"gitlab.tralios.de" pick:"_kube"
zload "software/tralios-kube"
# NOTE: fzf completion menu
turbo
zload Aloxaf/fzf-tab
# NOTE: autosuggest
turbo atload:"_zsh_autosuggest_start"
zload /usr/share/zsh/plugins/zsh-autosuggestions

View File

@ -119,3 +119,5 @@ function workon_cwd() {
}
}
add-zsh-hook chpwd workon_cwd
eval "$(direnv hook zsh)"