bashrc (7941B)
1 GPG_TTY=$(tty) 2 export GPG_TTY 3 export PATH=$PATH:/sbin 4 export PATH=$PATH:/home/andrew/bin:/home/andrew/go/bin 5 # export PATH=$PATH:/home/andrew/bin/matrix 6 # export PATH=$PATH:/home/andrew/bin/email 7 # export PATH=$PATH:/home/andrew/bin/gotify 8 export PATH=$PATH:/home/andrew/bin/backups 9 export PASSWORD_STORE_DIR=~/gitRepos/passwords 10 11 ## If not running interactively, don't do anything 12 #case $- in 13 # *i*) ;; 14 # *) return;; 15 #esac 16 17 HISTCONTROL=ignoreboth 18 19 # append to the history file, don't overwrite it 20 #shopt -s histappend 21 22 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 23 HISTSIZE=1000 24 HISTFILESIZE=2000 25 26 # check the window size after each command and, if necessary, 27 # update the values of LINES and COLUMNS. 28 # shopt -s checkwinsize 29 # if [ -n "$force_color_prompt" ]; then 30 # if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 31 # # We have color support; assume it's compliant with Ecma-48 32 # # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 33 # # a case would tend to support setf rather than setaf.) 34 # color_prompt=yes 35 # else 36 # color_prompt= 37 # fi 38 # fi 39 40 # unset color_prompt force_color_prompt 41 42 # If this is an xterm set the title to user@host:dir 43 # enable color support of ls and also add handy aliases 44 if [ -x /usr/bin/dircolors ]; then 45 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 46 alias ls='ls --color=auto' 47 #alias dir='dir --color=auto' 48 #alias vdir='vdir --color=auto' 49 50 #alias grep='grep --color=auto' 51 #alias fgrep='fgrep --color=auto' 52 #alias egrep='egrep --color=auto' 53 fi 54 55 eval "$(zoxide init bash)" 56 57 cd() { 58 if [ "$1" ]; then 59 z "$1" 60 else 61 command cd "$@" 62 fi 63 } 64 65 #alias tmux-purge='tmux list-sessions | grep -v attached | cut -d: -f1 | xargs -I{} tmux kill-session -t "{}"' 66 67 #alias tmux-attach='function _tmux_attach(){ tmux attach-session -t "$1"; }; _tmux_attach' 68 #alias tmux-new='function _tmux_new(){ tmux new-session -s "$1"; }; _tmux_new' 69 #alias tmux-end='function _tmux_end(){ tmux kill-session -t "$1"; }; _tmux_end' 70 71 # export SFML_INCLUDE_DIR=/usr/local/sfml/include 72 # export SFML_LIB_DIR=/usr/local/sfml/lib 73 # export LD_LIBRARY_PATH=$SFML_LIB_DIR:$LD_LIBRARY_PATH 74 75 # requires auth 76 # clone-public() { 77 # read -p "Enter repository name: " REPO_NAME 78 # git clone ssh://brgr/home/shared/git/public-repos/$REPO_NAME.git 79 # } 80 # 81 # clone-private() { 82 # read -p "Enter repository name: " REPO_NAME 83 # git clone ssh://brgr/home/shared/git/private-repos/$REPO_NAME.git 84 # } 85 86 alias pw='head -c -1 ~/gitRepos/keys/pw.txt | xclip -selection clipboard' 87 # alias pw_old='cat ~/gitRepos/keys/pw-old.txt | xclip -selection clipboard' 88 89 # alias mount-server="sshfs andrew@brgr.heron-peacock.ts.net:/home/shared/ /mnt/server/ -o reconnect" 90 # alias mount-home="sshfs andrew@brgr.heron-peacock.ts.net:/home/andrew/ /home/andrew/mount/ -o reconnect" 91 # alias mount-shared="sshfs andrew@brgr.heron-peacock.ts.net:/home/shared/ /home/andrew/mount/ -o reconnect" 92 93 sendit() { 94 git add . && git commit -m "$1" && git push 95 } 96 97 export EDITOR=nvim 98 # alias sshServer='ssh andrew@brgr.heron-peacock.ts.net' 99 100 export PS1='\u@\h:\W\$ ' 101 #TERM=xterm 102 103 #TERM=st-256color 104 # TERM=xterm-256color 105 #TERM=screen 106 107 # alias disableOff="xset s off && xset -dpms && xset s noblank" 108 109 # case $TERM in 110 # rxvt|*term) 111 # PROMPT_COMMAND='echo -ne "\033]0;$PWD\007"' 112 # ;; 113 # esac 114 115 export LANG=en_US.UTF-8 116 117 118 # alias play="mpv ~/local-vids/ --fs" 119 # export PATH="$HOME/.pyenv/bin:$PATH" 120 # eval "$(pyenv init --path)" 121 # eval "$(pyenv init -)" 122 #xrdb ~/.Xresources 123 alias vim="nvim" 124 # alias leet="~/bin/leetcode-submission.sh" 125 126 #source /usr/share/fzf/key-bindings.bash 127 alias checkout="~/bin/checkout.sh" 128 # alias branch="git branch" 129 alias src="source ~/venv/bin/activate" 130 131 # zcp() { 132 # if [ -z "$1" ]; then 133 # echo "No destination specified. Usage: zcp <zoxide target>" 134 # return 1 135 # fi 136 # cp -r $(find . | fzf -m) "$(zoxide query "$1")" 137 # } 138 # 139 # zmv() { 140 # if [ -z "$1" ]; then 141 # echo "No destination specified. Usage: zmv <zoxide target>" 142 # return 1 143 # fi 144 # mv $(find . | fzf -m) "$(zoxide query "$1")" 145 # } 146 147 eval "$(fzf --bash)" 148 149 # mans() { 150 # man -k . | awk '{print $1}' | fzf | sed 's/(.*)//' | xargs man 151 # } 152 153 packages() { 154 local pkgs 155 pkgs=$(pacman -Slq | fzf -m) || return 156 sudo pacman -S $pkgs 157 } 158 159 # what-the-hell-is-even-that(){ 160 # TMP=$(mktemp) 161 # pacman -Sq --info > $TMP 162 # nvim $TMP 163 # } 164 165 #bind '"\C-e" edit-and-execute-command' 166 export LYNX_CFG=/home/andrew/.config/lynx/lynx.cfg 167 168 #if [ -z "$MTM" ] && [ -n "$ABDUCO_SESSION" ]; then 169 # exec mtm 170 #fi 171 #alias abd="/home/andrew/bin/attach-abduco.sh" 172 # alias a="/home/andrew/bin/abduco.sh" 173 174 # fixes bind message 175 if [[ $- == *i* ]]; then 176 bind -f ~/.inputrc 177 fi 178 179 source ~/gitRepos/keys/secrets.txt > /dev/null 2>&1 180 181 # fuck this 182 # alias format="uv run dev manual-precommit" 183 184 # alias lock="i3lock -c 000000" 185 186 # build-run() { 187 # tcc $1 && ./a.out $2 $3 $4 $5 $6 $7 $8 $9 $10 # if you need more, who the fuck do you think you are? 188 # } 189 190 # uv 191 # export PATH="/home/andrew/.local/bin:$PATH" 192 193 # alias dev_build="uv run sculptor/scripts/dev.py rebuild_container_for_local_testing my_dev_control_plane_volume && SCULPTOR_CONTROL_PLANE_VOLUME=my_dev_control_plane_volume just tmux-dev" 194 # alias build_control_plane="uv run sculptor/sculptor/cli/dev.py build-control-plane" 195 196 # [ -f "/home/andrew/.ghcup/env" ] && . "/home/andrew/.ghcup/env" # ghcup-env 197 # alias format="uv run imbue_core/imbue_core/ratchets/test_all_ratchets.py test" 198 # alias clean-sculptor="rm -rf ~/.dev_sculptor && rm -rf ~/.sculptor && sudo docker system prune -af" 199 # #alias containers="docker exec -it $(docker ps -q | fzf ) bash" 200 # alias rust-book="rustup doc --book" 201 # alias yt-audio="yt-dlp --embed-metadata --embed-thumbnail -t mp3 $1" 202 # alias favorite="find ~/syncing/music -type f | fzf >> ~/syncing/music/favorites.m3u" 203 204 # this is shit. 205 # tmux is not good software. 206 #if [ -z $TMUX ]; then 207 # tmux 208 #fi 209 210 #alias daily-summary="/home/andrew/gitRepos/information-retrieval/web-research/build/main \"Find todays news on AI developments, acquisitions, and tech. ENSURE ALL INFORMATION IS FROM TODAY. DO NOT include information that is not from today. It is currently $(date). Give **full** links to sources as applicable.\"" 211 212 # This persists in .config, but I want to remember this in case things must change. 213 # xdg-settings set default-web-browser librewolf.desktop 214 215 216 #alias jb="fg %$(jobs | fzf | grep -oP '^\[\K[0-9]+')" 217 # alias print-today="date +%Y-%m-%d" 218 219 # message() { 220 # ( 221 # cd "/home/andrew/gitRepos/personal-notes" || exit 222 # vim "messages" 223 # ) 224 # } 225 # 226 # 227 # website() { 228 # ( 229 # cd "/home/andrew/personal-files/web" || exit 230 # MONTH=$(date "+%Y-%m") 231 # mkdir -p $MONTH 232 # cd $MONTH || exit 233 # vim . 234 # ) 235 # } 236 # 237 # today() { 238 # ( 239 # cd "/home/andrew/gitRepos/personal-notes" || exit 240 # PRIOR=$(ls daily/ | tail -n 1 | sed 's/\.md//g' || date -d "1 day ago" +%Y-%m-%d) 241 # TODAY=$(date +%Y-%m-%d) 242 # mkdir -p daily 243 # 244 # # if the file exists, do nothing 245 # # if it doesn't exist, copy yesterday's for continuity of todolist 246 # # TODO: Is this the best way to do this or should each day be irrespective of the prior, 247 # # keeping a singular top level todo list for things I don't plan to do in a given day? 248 # # uncertain. 249 # 250 # ls daily/$TODAY.md || cp daily/$PRIOR.md daily/$TODAY.md 251 # vim daily/$TODAY.md 252 # ) 253 # } 254 # 255 # # for ghidra 256 # export _JAVA_AWT_WM_NONREPARENTING=1 257 258 # just in case I ever almost forget. 259 go telemetry off 260 261 262 # BEGIN opam configuration 263 # This is useful if you're using opam as it adds: 264 # - the correct directories to the PATH 265 # - auto-completion for the opam binary 266 # This section can be safely removed at any time if needed. 267 268 test -r '/home/andrew/.opam/opam-init/init.sh' && . '/home/andrew/.opam/opam-init/init.sh' > /dev/null 2> /dev/null || true 269 # END opam configuration 270