Compare commits

...

8 commits
master ... ada

Author SHA1 Message Date
4fd5bbf529
piknik 2022-12-16 16:46:55 +01:00
722705f502
Truly enable antibody 2021-11-09 18:42:50 +01:00
a60ea5bf81
Add br completion 2021-11-09 18:42:29 +01:00
671c009fa8
Add git-tmux utils 2021-11-09 18:42:09 +01:00
65020a1d06
Update wgpg 2021-11-09 18:41:41 +01:00
5b32bfdcfc
Update man alias 2021-11-09 18:41:17 +01:00
8dbf08de1e
Fix certo completion 2021-06-09 11:19:29 +02:00
eb0c7e6162
Fix atuin keybindings 2021-06-09 11:19:15 +02:00

67
.zshrc
View file

@ -15,6 +15,7 @@ bindkey "^X^E" edit-command-line
autoload -Uz compinit autoload -Uz compinit
compinit compinit
. ${HOME}/.config/zsh/antibody.zsh . ${HOME}/.config/zsh/antibody.zsh
compinit
### KiTTY completion ### KiTTY completion
@ -68,6 +69,7 @@ fi
if [[ ! -z $TMUX ]]; then if [[ ! -z $TMUX ]]; then
export TERM=tmux-256color export TERM=tmux-256color
export TMUX_BASE=$(tmux display -p '#{pane_current_path}')
fi fi
## Editor ## Editor
@ -122,7 +124,7 @@ alias lh="ls -lh"
alias la="ls -la" alias la="ls -la"
alias ll="ls -l" alias ll="ls -l"
alias lrt="ls -lrt" alias lrt="ls -lrt"
alias wgpg="gpg --homedir /home/leo/.gnupg-work" alias wgpg="gpg --homedir /home/leo/.gnupg-sysdig"
alias agpg="gpg --homedir /home/leo/.gnupg-ai" alias agpg="gpg --homedir /home/leo/.gnupg-ai"
alias ai_all="cat ${HOME}/Documents/personal/ai/code/prod/hosts.yml|yq '[.hosts|to_entries[]|{"key": .key, "value": .value.groups}]|from_entries'" alias ai_all="cat ${HOME}/Documents/personal/ai/code/prod/hosts.yml|yq '[.hosts|to_entries[]|{"key": .key, "value": .value.groups}]|from_entries'"
alias pacbrowse="pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'" alias pacbrowse="pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'"
@ -267,9 +269,20 @@ urldecode() {
printf '%b' "${url_encoded//%/\\x}" printf '%b' "${url_encoded//%/\\x}"
} }
ce() {
if [ "z$TMUX" != "z" ] && [ "z$TMUX_BASE" != "z" ] ; then
cd $()
cd $TMUX_BASE
else
cd
fi
}
## Custom completion ## Custom completion
# certo # certo
eval "$(_CERTO_COMPLETE=source_zsh certo)" if which certo > /dev/null; then
eval "$(_CERTO_COMPLETE=source_zsh certo)"
fi
## powerline ## powerline
@ -280,11 +293,10 @@ fi
## Colored manual ## Colored manual
function _man() { function cman() {
man $@ | bat -p --language="man" man $@ | bat -p --language="man"
} }
compdef cman='man'
alias man="_man"
## Local only ## Local only
@ -292,6 +304,47 @@ if [ -f ${HOME}/.zshrc.local ]; then
. ${HOME}/.zshrc.local . ${HOME}/.zshrc.local
fi fi
# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh ### atuin (shell history)
export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"
bindkey '^r' _atuin_search_widget
### broot file browser
source /home/leo/.config/broot/launcher/bash/br
### piknik
# pko <content> : copy <content> to the clipboard
function pko() {
echo "$*" | piknik -copy
}
# pkf <file> : copy the content of <file> to the clipboard
function pkf() {
piknik -copy < $1
}
# pkc : read the content to copy to the clipboard from STDIN
alias pkc='piknik -copy'
# pkp : paste the clipboard content
alias pkp='piknik -paste'
# pkm : move the clipboard content
alias pkm='piknik -move'
# pkz : delete the clipboard content
alias pkz='piknik -copy < /dev/null'
# pkfr [<dir>] : send a whole directory to the clipboard, as a tar archive
function pkfr() {
tar czpvf - ${1:-.} | piknik -copy
}
# pkpr : extract clipboard content sent using the pkfr command
alias pkpr='piknik -paste | tar xzpvf -'
# vim: set ft=zsh et sw=0 ts=2 sts=0: # vim: set ft=zsh et sw=0 ts=2 sts=0: