update config

This commit is contained in:
fred 2025-08-12 11:58:29 -07:00
parent f610209aff
commit ae92148089
34 changed files with 387 additions and 240 deletions

View file

@ -1,7 +1,7 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
#dont put duplicate lines or lines starting with space in the history
# dont put duplicate lines or lines starting with space in the history
# See bash(1) for more options
HISTCONTROL=ignoreboth
HISTFILESIZE=-1
@ -12,6 +12,8 @@ if [ -f ~/.bash_local ]; then
. ~/.bash_local
fi
# show tldr on terminal start
# tldr --quiet $(tldr --quiet --list | shuf -n1)
PS1="\[\e[32m\][\[\e[m\]\[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]\[\e[32m\]]\[\e[m\]\[\e[34m\]\W\[\e[m\]\[\e[36m\]\\$\[\e[m\] "
if [ ! -z "$SSH_CLIENT" ]

View file

@ -0,0 +1,7 @@
alias g='git'
alias ga='git add'
alias gc='git commit'
alias gs='git status'
alias gd='git diff'
alias lg='lazygit'
alias gtop="cd \$(git rev-parse --show-toplevel)" # go to top level of git repo

View file

@ -0,0 +1,23 @@
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias du='du -h'
alias diff='diff --color=auto'
alias grep='grep --color=auto'
alias ip='ip -color=auto'
alias ls='ls --color=auto'
alias vm='mv'
alias cat='bat -pp'
alias man='batman'
alias ll="ls -lhA"
alias sl='ls'
alias -- -='cd -'
alias caddy_reload="docker exec -it caddy sh -c 'cd /etc/caddy && caddy reload'"
mkcd() { mkdir -p "$@" && cd "$@"; }
rnd() { echo $((RANDOM%10000+1000)); }
### NIX ###
alias rebuild="sudo nixos-rebuild switch --flake ~/nixos#$NIXHOST"
alias search="nix search nixpkgs"