Improve shell config. Add nnn and kitty configs

master
Ian Mancini 4 years ago
parent e17507adb1
commit 40f6958a00

@ -31,7 +31,7 @@ colors:
foreground: '{{COLORS.foreground}}'
cursor:
text: '{{COLORS.foreground}}'
text: '{{COLORS.background}}'
cursor: '{{COLORS.cursor}}'
normal:

@ -1,12 +1,6 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# load Aliases
[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc"
# Load environment
[ -f "$HOME/.aliasrc" ] && source "$HOME/.envrc"
# Enable bash_completion
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
@ -158,3 +152,9 @@ function parse_git_dirty {
}
export PS1="\[\e[95m\]\u\[\e[m\]@\[\e[96m\]\h\[\e[m\]:\w \[\e[92m\]\`parse_git_branch\`\[\e[m\] \[\e[91m\]\\$\[\e[m\] "
# Load environment
[ -f "$HOME/.aliasrc" ] && source "$HOME/.envrc"
# load Aliases
[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc"

@ -6,8 +6,6 @@ command -v nvim >/dev/null && alias vi="nvim" vim="nvim" vimdiff="nvim -d"
# Verbose
alias \
cp="cp -iv" \
mv="mv -iv" \
rm="rm -v" \
mkdir="mkdir -pv" \
dmesg="dmesg --ctime" \
@ -19,7 +17,20 @@ alias \
ll="ls -lahN --group-directories-first --color=auto" \
grep="grep -i --color=auto" \
Grep="grep --color=auto" \
diff="diff --color=auto" \
diff="diff --color=auto"
# Xorg
alias startx="startx ~/.xinitrc"
# Improved coreutils
alias \
ls="ls-icons" \
cat="bat" \
top="gotop"\
cp="advcp -pi" \
mv="advmv -pi"
# Other software
alias \
nnn='n' \
N='sudo -E nnn -daH '

@ -2,7 +2,7 @@
# env
EDITOR="nvim"
TERMINAL="alacritty"
TERMINAL="kitty"
BROWSER="chromium"
# bin
@ -23,6 +23,40 @@ export LESS_TERMCAP_so=$'\E[01;42;30m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;36m'
# nnn
n() {
# Block nesting of nnn in subshells
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
nnn -a "$@"
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
export NNN_BMS='D:~/Documents;n:~/Nextcloud;d:~/Downloads/;s:~/Sandbox;p:~/Pictures'
export NNN_SSHFS="sshfs -o follow_symlinks" # make sshfs follow symlinks on the remote
export NNN_COLORS="2136" # use a different color for each context
export NNN_TRASH=1 # trash (needs trash-cli) instead of delete
export NNN_PLUG='p:preview-tabbed;m:nmount;b:bookmarks;c:chksum;l:launch;n:nuke'
# fzf
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
@ -49,8 +83,10 @@ export PIPENV_PYTHON=$PYENV_ROOT/shims/python
eval "$(pipenv --completion)"
# Keychain
if [ -z ${DISPLAY+x} ]; then
eval "$(keychain --eval --quiet --noask --agents gpg,ssh id_rsa)"
else
eval "$(keychain --eval --quiet --agents gpg,ssh id_rsa)"
fi
keychain() {
if [ -z ${DISPLAY+x} ]; then
eval "$(keychain --eval --quiet --noask --agents gpg,ssh id_rsa)"
else
eval "$(keychain --eval --quiet --agents gpg,ssh id_rsa)"
fi
}

File diff suppressed because it is too large Load Diff

@ -116,9 +116,8 @@ zstyle ':completion:*' cache-path ~/.zsh/cache
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# Load aliases
[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc"
# Load environment
[ -f "$HOME/.aliasrc" ] && source "$HOME/.envrc"
# Load aliases
[ -f "$HOME/.aliasrc" ] && source "$HOME/.aliasrc"

@ -1,6 +1,6 @@
#!/bin/bash
FONT="Iosevka Term"
FONT="Iosevka"
FONTSTYLE="Medium"
FONTBOLDSTYLE="Bold"
FONTITALICSTYLE="Oblique"

Loading…
Cancel
Save