feat: add templating for laptop dotfiles
This commit is contained in:
parent
caf6e25e43
commit
bdf7e407cb
21 changed files with 437 additions and 52 deletions
34
private_dot_bashrc.tmpl
Executable file
34
private_dot_bashrc.tmpl
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# don't put duplicate lines or those starting with spacein history
|
||||
export HISTCONTROL=ignorespace:ignoredups
|
||||
export HISTIGNORE='ls:cd:q'
|
||||
shopt -s histappend
|
||||
|
||||
# prompt
|
||||
blue="\[\e[38;5;50m\]"
|
||||
reset="\[\e[00m\]"
|
||||
cwd=$blue'\w'$reset
|
||||
{{- if has "desktop" .class }}
|
||||
user_host=$blue'\u@\h'$reset
|
||||
history='\!'
|
||||
export PS1="╭─($user_host)───[$history]───($cwd)\n╰╼ "
|
||||
{{- else }}
|
||||
export PS1="╭╢$cwd\n╰╼ "
|
||||
{{- end }}
|
||||
export PS2="╰┤ "
|
||||
|
||||
if [[ "$PATH" != *"$HOME/bin"* ]]; then
|
||||
PATH=$PATH:"$HOME/bin"
|
||||
fi
|
||||
|
||||
bind 'set mark-symlinked-directories on'
|
||||
export EDITOR='/usr/bin/env nvim'
|
||||
export VISUAL='/usr/bin/env nvim'
|
||||
|
||||
function conf() {
|
||||
fname="${XDG_CONFIG_HOME:-$HOME/.config}/$1"
|
||||
test -f "$fname" && source "$fname"
|
||||
}
|
||||
|
||||
conf bash/cmds.bash
|
||||
Loading…
Add table
Add a link
Reference in a new issue