summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bash_profile19
-rw-r--r--.bashrc25
2 files changed, 44 insertions, 0 deletions
diff --git a/.bash_profile b/.bash_profile
new file mode 100644
index 0000000..f592eb3
--- /dev/null
+++ b/.bash_profile
@@ -0,0 +1,19 @@
+export LANG="en_US.UTF-8"
+export EDITOR="nvim"
+export PAGER="less"
+
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_CACHE_HOME="$HOME/.cache"
+export XDG_STATE_HOME="$HOME/.local/state"
+
+export GNUPGHOME="$XDG_DATA_HOME/gnupg"
+export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
+export GOPATH="$XDG_DATA_HOME/go"
+export CARGO_HOME="$XDG_DATA_HOME/cargo"
+export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
+export SVDIR="$XDG_CONFIG_HOME/service"
+
+export PATH="$HOME/.local/bin:$PATH"
+
+[[ -f "$HOME/.bashrc" ]] && . "$HOME/.bashrc"
diff --git a/.bashrc b/.bashrc
new file mode 100644
index 0000000..335fce6
--- /dev/null
+++ b/.bashrc
@@ -0,0 +1,25 @@
+# shellcheck shell=bash
+
+[[ $- != *i* ]] && return
+
+__has() { hash "$1" 2>/dev/null; }
+
+HISTSIZE=
+HISTCONTROL="erasedups:ignorespace"
+HISTFILE="$XDG_STATE_HOME/bash/history"
+
+PS1='\u@\h:\w\$ '
+
+alias g='git'
+alias t='tmux'
+
+__has nvim && alias vim='nvim'
+__has vim && alias vi='vim'
+alias doas='doas '
+alias sudo='sudo '
+
+alias ls='ls --color=auto -AF'
+alias grep='grep --color=auto'
+
+[[ ! -d "$(dirname "$HISTFILE")" ]] && mkdir -p "$(dirname "$HISTFILE")"
+unset __has