Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
4fd5bbf529 | |||
722705f502 | |||
a60ea5bf81 | |||
671c009fa8 | |||
65020a1d06 | |||
5b32bfdcfc | |||
8dbf08de1e | |||
eb0c7e6162 |
1 changed files with 60 additions and 7 deletions
65
.zshrc
65
.zshrc
|
@ -15,6 +15,7 @@ bindkey "^X^E" edit-command-line
|
|||
autoload -Uz compinit
|
||||
compinit
|
||||
. ${HOME}/.config/zsh/antibody.zsh
|
||||
compinit
|
||||
|
||||
### KiTTY completion
|
||||
|
||||
|
@ -68,6 +69,7 @@ fi
|
|||
|
||||
if [[ ! -z $TMUX ]]; then
|
||||
export TERM=tmux-256color
|
||||
export TMUX_BASE=$(tmux display -p '#{pane_current_path}')
|
||||
fi
|
||||
|
||||
## Editor
|
||||
|
@ -122,7 +124,7 @@ alias lh="ls -lh"
|
|||
alias la="ls -la"
|
||||
alias ll="ls -l"
|
||||
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 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)'"
|
||||
|
@ -267,9 +269,20 @@ urldecode() {
|
|||
printf '%b' "${url_encoded//%/\\x}"
|
||||
}
|
||||
|
||||
ce() {
|
||||
if [ "z$TMUX" != "z" ] && [ "z$TMUX_BASE" != "z" ] ; then
|
||||
cd $()
|
||||
cd $TMUX_BASE
|
||||
else
|
||||
cd
|
||||
fi
|
||||
}
|
||||
|
||||
## Custom completion
|
||||
# certo
|
||||
eval "$(_CERTO_COMPLETE=source_zsh certo)"
|
||||
if which certo > /dev/null; then
|
||||
eval "$(_CERTO_COMPLETE=source_zsh certo)"
|
||||
fi
|
||||
|
||||
## powerline
|
||||
|
||||
|
@ -280,11 +293,10 @@ fi
|
|||
|
||||
## Colored manual
|
||||
|
||||
function _man() {
|
||||
function cman() {
|
||||
man $@ | bat -p --language="man"
|
||||
}
|
||||
|
||||
alias man="_man"
|
||||
compdef cman='man'
|
||||
|
||||
## Local only
|
||||
|
||||
|
@ -292,6 +304,47 @@ if [ -f ${HOME}/.zshrc.local ]; then
|
|||
. ${HOME}/.zshrc.local
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue