mord shell
This commit is contained in:
parent
20e67036df
commit
3697eec6e1
|
@ -45,44 +45,35 @@ trysource() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Superseding commands with better ones if they are present
|
||||
_rank_select() { # executables... -- arguments...
|
||||
for ex in "$@"; do
|
||||
[ "$ex" = "--" ] && break
|
||||
if which "$ex" &>/dev/null; then
|
||||
for al in "$@"; do
|
||||
shift
|
||||
[ "$al" = "--" ] && break
|
||||
alias "$al"="$ex"
|
||||
done
|
||||
"$ex" "$@"
|
||||
return $?
|
||||
_i_prefer() { # executables...
|
||||
for candidate in "$@"
|
||||
do
|
||||
if [ -x "$(command -v "$candidate")" ]
|
||||
then
|
||||
choice="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
for ex in "$@"; do
|
||||
[ "$al" = "--" ] && break
|
||||
if [ -z "$list" ]; then
|
||||
list=$ex
|
||||
else
|
||||
list=$list, $ex
|
||||
if [ -z "$choice" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
for candidate in "$@"
|
||||
do
|
||||
if [ "$candidate" != "$choice" ]
|
||||
then
|
||||
alias "$candidate"="$choice"
|
||||
fi
|
||||
done
|
||||
echo "Not installed: $list"
|
||||
}
|
||||
|
||||
_rank_install() { # executables...
|
||||
for ex in "$@"; do
|
||||
list=$@
|
||||
alias "$ex"="_rank_select $list --"
|
||||
done
|
||||
}
|
||||
_rank_install nvim vim vi
|
||||
_rank_install gopass pass
|
||||
_rank_install wakeonlan wol
|
||||
_rank_install neomutt mutt
|
||||
_i_prefer nvim vim vi
|
||||
_i_prefer gopass pass
|
||||
_i_prefer wakeonlan wol
|
||||
_i_prefer neomutt mutt
|
||||
unset _i_prefer
|
||||
|
||||
## COLORS
|
||||
|
||||
[ -f ~/.local/bin/colorSchemeApply ] && . ~/.local/bin/colorSchemeApply
|
||||
trysource ~/.local/bin/colorSchemeApply
|
||||
# Needed because xterm/urxvt won't use the last color, needed for vim
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@ unsetopt AUTO_REMOVE_SLASH
|
|||
trysource /usr/share/fzf/key-bindings.zsh
|
||||
|
||||
# Help
|
||||
# TODO Doesn't work (how ironic)
|
||||
autoload -Uz run-help
|
||||
unalias run-help
|
||||
alias help=run-help
|
||||
|
@ -164,7 +165,7 @@ setopt PUSHD_MINUS # This reverts the +/- operators.
|
|||
|
||||
|
||||
# Command not found
|
||||
# (since we have syntax highlighting there is no need to wait to see that we typed crap)
|
||||
# (since we have syntax highlighting we are not forced to wait to see that we typed crap)
|
||||
trysource /usr/share/doc/pkgfile/command-not-found.zsh
|
||||
|
||||
# History
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/usr/lib/systemd/user/psd.service
|
11
tmux.conf
Normal file
11
tmux.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
|
||||
set -g @plugin 'jimeh/tmux-themepack'
|
||||
set -g @themepack 'powerline/block/green'
|
||||
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.cache/tmuxplugins/'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run -b '~/.cache/tmuxplugins/tpm/tpm'
|
Loading…
Reference in a new issue