Marty Oehme
348a167390
Fixes tmux xdg-compliance (and, more importantly, Tmux Plugin Manager's) by setting the environment variable TMUX_PLUGIN_MANAGER_PATH to follow xdg specifications. Tmux, due to not being xdg-compliant, needs to be aliased to start with the `-f` option pointing into the configuration directory. Fixes tmux vim nagigator's controls being overwritten by other control schemes in tmux.
58 lines
1.2 KiB
Bash
58 lines
1.2 KiB
Bash
#!/usr/bin/env sh
|
|
#
|
|
# Global aliases for any shell
|
|
|
|
exist() { type "$1" >/dev/null 2>&1; }
|
|
|
|
# Avoid aliases which I did not create -- unalias EVERYTHING
|
|
unalias -a
|
|
|
|
# v shorthand for neovim
|
|
alias v="nvim"
|
|
|
|
# exit shell mimicks vim
|
|
alias :q="exit"
|
|
|
|
# ls defaults
|
|
if exist exa; then
|
|
alias l="exa -l --git --git-ignore"
|
|
alias L="exa -hal --grid --git"
|
|
# a recursive tree
|
|
# - usually want to change levels recursed with -L2 -L3 or similar
|
|
alias ll="exa --tree -L2"
|
|
alias LL="exa -a --tree -L2"
|
|
else
|
|
alias l="ls -lhF"
|
|
alias L="ls -lAhF"
|
|
fi
|
|
|
|
# cd defaults
|
|
alias ..="cd .."
|
|
alias ...="cd ../.."
|
|
alias ~="cd ~"
|
|
|
|
# clear my screen
|
|
alias cl="clear"
|
|
|
|
# Display current external ip address
|
|
alias myip="curl -s icanhazip.com"
|
|
|
|
# fzf
|
|
if exist fzf; then
|
|
# Display fuzzy-searchable history
|
|
alias fzf_history="history | fzf --tac --height 20"
|
|
# Fuzzy search packages to install
|
|
if exist yay; then
|
|
alias fzf_yay="yay -Slq | fzf -m --preview 'yay -Si {1}' | xargs -ro yay -S"
|
|
# Fuzzy uninstall packages
|
|
alias fzf_yayrns="yay -Qeq | fzf -m --preview 'yay -Qi {1}' | xargs -ro yay -Rns"
|
|
fi
|
|
fi
|
|
|
|
# vifm
|
|
if exist vifm; then
|
|
alias vm=vifm
|
|
alias vmm='vifm ${PWD}'
|
|
# enable picture preview script
|
|
exist vifmrun && alias vifm=vifmrun
|
|
fi
|