bash: update with yash

This commit is contained in:
yosh 2023-10-27 22:33:48 -04:00
parent dd35727c5d
commit 5c0c5ed54e
2 changed files with 22 additions and 14 deletions

View File

@ -16,13 +16,20 @@ export PENTADACTYL_RUINTIME="$XDG_CONFIG_HOME/pentadactyl"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export SRB2WADDIR="$XDG_DATA_HOME/srb2kart/wads"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonstartup.py"
export GOPATH="$XDG_DATA_HOME/go"
export GOMODCACHE="$XDG_CACHE_HOME/go/mod"
export SQLITE_HISTORY="$XDG_RUNTIME_DIR/sqlite_history"
export PSQL_HISTORY="$XDG_RUNTIME_DIR/psql_history"
export RXVT_SOCKET="$XDG_RUNTIME_DIR/urxvt-$(uname -n)"
# }}}
# other config {{{
export PATH="$HOME/.local/bin:$HOME/.local/scripts:$PATH:$JAVA_HOME/bin"
export PATH="$HOME/.local/bin:$HOME/.local/scripts:$PATH"
export MANPATH="$XDG_DATA_HOME/man:"
export EDITOR="vim"
export VISUAL="vim"
export TERMINAL="urxvtc"
export FLOATING_TERMINAL="urxvtc -name FLOATING_TERMINAL"
export QT_STYLE_OVERRIDE=kvantum
# }}}
@ -34,23 +41,23 @@ export LESS='-Ri'
# }}}
# fzf {{{
export FZF_DEFAULT_COMMAND="fd -t f --strip-cwd-prefix"
export FZF_DEFAULT_COMMAND='find -nohidden -type f -printf "%P\n"'
export FZF_DEFAULT_OPTS='
--color "fg:7,bg:-1,hl:12,fg+:11,bg+:0,hl+:13,info:9,border:0,prompt:4,pointer:10,marker:2,spinner:13,header:7"
--border -e
--bind ctrl-space:print-query+abort
'
# }}}
#
# nnn {{{
export NNN_OPTS="aAeQ"
export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$"
export NNN_COLORS='#0d0d0d0d0d0d0d0d'
BLK="0B" CHR="0B" DIR="0d" EXE="0a" REG="07" HARDLINK="0e" SYMLINK="0e" MISSING="08" ORPHAN="09" FIFO="03" SOCK="0B" OTHER="06"
export NNN_FCOLORS="$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$OTHER"
nc='c:-!magick convert "$nnn" png:- | xclip -sel clipboard -t image/png*'
nm='h:-!hx "$nnn"*;o:-fzopen;d:dragdrop;p:preview-tui'
export NNN_PLUG="$nc;$nm"
_nc='c:-!magick convert "$nnn" png:- | xclip -sel clipboard -t image/png*'
_nm='h:-!hx "$nnn"*;o:-fzopen;d:dragdrop;p:preview-tui'
export NNN_PLUG="$_nc;$_nm"
# }}}
# }}}

View File

@ -26,16 +26,17 @@ alias dotfiles='/usr/bin/git --git-dir=$HOME/.local/dotfiles --work-tree=$HOME'
# XDG aliases
alias startx='startx "$XDG_CONFIG_HOME/X11/xinitrc"'
# Prompt
c=("\[\e[30m\]" "\[\e[31m\]" "\[\e[32m\]" "\[\e[33m\]" "\[\e[34m\]" "\[\e[35m\]" "\[\e[36m\]" "\[\e[37m\]" "\[\e[90m\]" "\[\e[91m\]" "\[\e[92m\]" "\[\e[93m\]" "\[\e[94m\]" "\[\e[95m\]" "\[\e[96m\]" "\[\e[97m\]")
PS1="${c[15]}[${c[13]}\u${c[15]}@${c[10]}\h${c[15]}] ${c[8]}*${c[15]} ${c[6]}\w
${c[9]}└─────\[\e[39m\] "
# Prompt and nnn
_c=("\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]" "\[\]")
if [ "${NNNLVL:-0}" -ge 1 ]; then
alias nnn="echo don\'t nest nnn!"
PS1="${c[15]}[${c[13]}\u${c[15]}@${c[10]}\h${c[15]}] ${c[9]}nnn${c[15]} ${c[6]}\w
${c[9]}└─────\[\e[39m\] "
export sel="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection"
export nnnsel="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection"
_prompt_flags="${_prompt_flags:-} ${_c[9]}nnn"
fi
unset c
PS1="${_c[15]}[${_c[13]}\u${_c[15]}@${_c[10]}\h${_c[15]}]${_prompt_flags:-}${_c[15]} ${_c[8]}*${_c[15]} ${_c[6]}\w
${_c[9]}└─────${_c[16]} "
unset _c
unset _prompt_flags