Compare commits

...

2 Commits

6 changed files with 43 additions and 0 deletions

View File

@ -2,6 +2,7 @@
# https://www.chezmoi.io/reference/special-files-and-directories/chezmoiignore/
README.md
.bashrc
{{- if ne .chezmoi.osRelease.id "arch" }}
# Other than Arch Linux
@ -32,6 +33,11 @@ README.md
# for `root` user
.config/*
# bashrc
!.bashrc
!.config/bash
.config/bash/bashrc
# fish-shell
!.config/fish
.config/fish/**/*

11
.chezmoitemplates/bashrc Normal file
View 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
View File

@ -0,0 +1 @@
{{- template "bashrc" . -}}

View 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

View File

@ -0,0 +1 @@
{{- template "bashrc" . -}}

15
dot_config/bash/envs.tmpl Normal file
View 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"