mord shell
This commit is contained in:
parent
20e67036df
commit
3697eec6e1
|
@ -45,44 +45,35 @@ trysource() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Superseding commands with better ones if they are present
|
_i_prefer() { # executables...
|
||||||
_rank_select() { # executables... -- arguments...
|
for candidate in "$@"
|
||||||
for ex in "$@"; do
|
do
|
||||||
[ "$ex" = "--" ] && break
|
if [ -x "$(command -v "$candidate")" ]
|
||||||
if which "$ex" &>/dev/null; then
|
then
|
||||||
for al in "$@"; do
|
choice="$candidate"
|
||||||
shift
|
break
|
||||||
[ "$al" = "--" ] && break
|
|
||||||
alias "$al"="$ex"
|
|
||||||
done
|
|
||||||
"$ex" "$@"
|
|
||||||
return $?
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for ex in "$@"; do
|
if [ -z "$choice" ]
|
||||||
[ "$al" = "--" ] && break
|
then
|
||||||
if [ -z "$list" ]; then
|
return
|
||||||
list=$ex
|
fi
|
||||||
else
|
for candidate in "$@"
|
||||||
list=$list, $ex
|
do
|
||||||
|
if [ "$candidate" != "$choice" ]
|
||||||
|
then
|
||||||
|
alias "$candidate"="$choice"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Not installed: $list"
|
|
||||||
}
|
}
|
||||||
|
_i_prefer nvim vim vi
|
||||||
_rank_install() { # executables...
|
_i_prefer gopass pass
|
||||||
for ex in "$@"; do
|
_i_prefer wakeonlan wol
|
||||||
list=$@
|
_i_prefer neomutt mutt
|
||||||
alias "$ex"="_rank_select $list --"
|
unset _i_prefer
|
||||||
done
|
|
||||||
}
|
|
||||||
_rank_install nvim vim vi
|
|
||||||
_rank_install gopass pass
|
|
||||||
_rank_install wakeonlan wol
|
|
||||||
_rank_install neomutt mutt
|
|
||||||
|
|
||||||
## COLORS
|
## 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
|
# 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
|
trysource /usr/share/fzf/key-bindings.zsh
|
||||||
|
|
||||||
# Help
|
# Help
|
||||||
|
# TODO Doesn't work (how ironic)
|
||||||
autoload -Uz run-help
|
autoload -Uz run-help
|
||||||
unalias run-help
|
unalias run-help
|
||||||
alias help=run-help
|
alias help=run-help
|
||||||
|
@ -164,7 +165,7 @@ setopt PUSHD_MINUS # This reverts the +/- operators.
|
||||||
|
|
||||||
|
|
||||||
# Command not found
|
# 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
|
trysource /usr/share/doc/pkgfile/command-not-found.zsh
|
||||||
|
|
||||||
# History
|
# 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