diff --git a/.zshrc b/.zshrc index 34903c6..ab9de6b 100644 --- a/.zshrc +++ b/.zshrc @@ -68,6 +68,7 @@ fi if [[ ! -z $TMUX ]]; then export TERM=tmux-256color + export TMUX_BASE=$(tmux display -p '#{pane_current_path}') fi ## Editor @@ -122,7 +123,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)'" @@ -140,8 +141,9 @@ export DRONE_TOKEN=${drone_token} fpath+=/usr/share/git/completion ## mailbundle +export MAILDIR="${HOME}/Mail" alias mutt="neomutt" -alias mailbundle="/opt/mailbundle/config/bin/autorun" +alias mailbundle="${MAILDIR}/mailbundle/config/bin/autorun" ## torbrowser export PATH=/opt/tor-browser_en-US:$PATH @@ -267,6 +269,15 @@ 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 if which certo > /dev/null; then @@ -282,11 +293,11 @@ fi ## Colored manual -function _man() { +function color_man() { man $@ | bat -p --language="man" } -alias man="_man" +alias man="color_man" ## Local only @@ -301,3 +312,5 @@ eval "$(atuin init zsh)" bindkey '^r' _atuin_search_widget # vim: set ft=zsh et sw=0 ts=2 sts=0: + +source /home/leo/.config/broot/launcher/bash/br