bash: add bashrc, alias and envs (also add .bashrc for root user)
This commit is contained in:
parent
33c0936e53
commit
3e8e8c769e
11
.chezmoitemplates/bashrc
Normal file
11
.chezmoitemplates/bashrc
Normal file
@ -0,0 +1,11 @@
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# Set enviroment variables here.
|
||||
[[ -f ~/.config/bash/envs ]] && . ~/.config/bash/envs
|
||||
|
||||
# Source (read) `alias` file.
|
||||
[[ -f ~/.config/bash/alias ]] && . ~/.config/bash/alias
|
||||
|
||||
# Customize prompt
|
||||
PS1='[\u@\h \W]\$ '
|
1
dot_bashrc.tmpl
Normal file
1
dot_bashrc.tmpl
Normal file
@ -0,0 +1 @@
|
||||
{{- template "bashrc" . -}}
|
9
dot_config/bash/alias.tmpl
Normal file
9
dot_config/bash/alias.tmpl
Normal file
@ -0,0 +1,9 @@
|
||||
if command -v exa &> /dev/null
|
||||
then
|
||||
alias ls='exa'
|
||||
alias la='exa -lag'
|
||||
alias tree='exa -a --tree --git-ignore --level=3'
|
||||
else
|
||||
alias ls='ls --color=auto'
|
||||
alias la='ls --color=auto -la'
|
||||
fi
|
1
dot_config/bash/bashrc.tmpl
Normal file
1
dot_config/bash/bashrc.tmpl
Normal file
@ -0,0 +1 @@
|
||||
{{- template "bashrc" . -}}
|
15
dot_config/bash/envs.tmpl
Normal file
15
dot_config/bash/envs.tmpl
Normal file
@ -0,0 +1,15 @@
|
||||
export XDG_CONFIG_HOME="$HOME"/.config
|
||||
export XDG_DATA_HOME="$HOME"/.local/share
|
||||
export XDG_RUNTIME_DIR=/run/user/{{ .chezmoi.uid }}
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_DESKTOP_DIR="$HOME/vc/desk"
|
||||
export XDG_DOCUMENTS_DIR="$HOME/vc/docs"
|
||||
export XDG_DOWNLOAD_DIR="$HOME/dl"
|
||||
export XDG_MUSIC_DIR="$HOME/vc/audio"
|
||||
export XDG_PICTURES_DIR="$HOME/vc/pix"
|
||||
export XDG_VIDEOS_DIR="$HOME/vc/vids"
|
||||
|
||||
export HISTFILE="$XDG_DATA_HOME"/bash/history
|
||||
export PATH="$XDG_DATA_HOME/cargo/bin:$PATH"
|
Loading…
Reference in New Issue
Block a user