A mixed bad of updates
= Housekeeping, missing shrc.d and some changing in order. Most notably, split of editor aliases to separate file. + The missing .shrc.d files that were added: * keyboard mappings * bin.path - which includes cleanup * oh-my-posh compltions + edit-with-spacemacs ready for us, almost feature complete I still plan on making it resue existing frames is possible. + oh-my-posh config to include `systemctl is-system-running` to prompt when stat is not 'running' (mostly it will be shown when 'degraded')
This commit is contained in:
parent
8cb6f49db9
commit
f445d39fc6
8 changed files with 109 additions and 17 deletions
9
_home/dot_sz.shrc.d/10_bin.path
Normal file
9
_home/dot_sz.shrc.d/10_bin.path
Normal file
|
@ -0,0 +1,9 @@
|
|||
# set PATH so it includes user's private bin if it exists
|
||||
if [[ -d "$HOME/bin" ]] ; then
|
||||
export PATH="~/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [[ -d "$HOME/.local/bin" ]] ; then
|
||||
export PATH="~/.local/bin:$PATH"
|
||||
fi
|
|
@ -1,22 +1,5 @@
|
|||
alias sudo="/usr/bin/sudo "
|
||||
PREFERED_VI=$(type -fP nvim vim | head -1)
|
||||
if [[ -z "$PREFERED_VI" ]]; then
|
||||
PREFERED_VI=$(type -fP vi | head -1)
|
||||
|
||||
if [[ -z "$PREFERED_VI" ]]; then
|
||||
alias vi_editor='eval $EDITOR '
|
||||
else
|
||||
alias vi_editor="$PREFERED_VI "
|
||||
fi
|
||||
else
|
||||
alias vi_editor="$PREFERED_VI -p "
|
||||
fi
|
||||
alias nvim="vi_editor "
|
||||
alias vim="vi_editor "
|
||||
alias vi="vi_editor "
|
||||
|
||||
alias lessr="less --raw-control-chars "
|
||||
|
||||
alias ed="nvim "
|
||||
|
||||
alias sz-edshrc="ed ~/.sz.shrc.d ; exec $SHELL"
|
||||
|
|
21
_home/dot_sz.shrc.d/22_editor.aliases
Normal file
21
_home/dot_sz.shrc.d/22_editor.aliases
Normal file
|
@ -0,0 +1,21 @@
|
|||
if [[ -n "$(type -fP emacsclient)" && -n "$(type -fP emacs)" && -n "$(type -fP edit-with-spacemacs)" ]]; then
|
||||
alias vi_editor='edit-with-spacemacs'
|
||||
else
|
||||
PREFERED_VI=$(type -fP nvim vim | head -1)
|
||||
if [[ -z "$PREFERED_VI" ]]; then
|
||||
PREFERED_VI=$(type -fP vi | head -1)
|
||||
|
||||
if [[ -z "$PREFERED_VI" ]]; then
|
||||
alias vi_editor='eval $EDITOR '
|
||||
else
|
||||
alias vi_editor="$PREFERED_VI"
|
||||
fi
|
||||
else
|
||||
alias vi_editor="$PREFERED_VI -p"
|
||||
fi
|
||||
fi
|
||||
alias nvim="vi_editor"
|
||||
alias vim="vi_editor"
|
||||
alias vi="vi_editor"
|
||||
|
||||
alias ed="vi_editor"
|
5
_home/dot_sz.shrc.d/97_keyboard_mappings
Normal file
5
_home/dot_sz.shrc.d/97_keyboard_mappings
Normal file
|
@ -0,0 +1,5 @@
|
|||
if [[ -n "$(type -fP setxkbmap)" ]]; then
|
||||
setxkbmap -option
|
||||
setxkbmap -option caps:escape
|
||||
setxkbmap -option caps:ctrl_modifier
|
||||
fi
|
1
_home/dot_sz.shrc.d/bash.post/99_oh-my-posh.complete
Normal file
1
_home/dot_sz.shrc.d/bash.post/99_oh-my-posh.complete
Normal file
|
@ -0,0 +1 @@
|
|||
[[ -n "$(type -fP gcloud)" ]] && source <(oh-my-posh completion bash)
|
Loading…
Add table
Add a link
Reference in a new issue