···11-#!/bin/sh
22-33-PS1='$(prompt) \$ '
44-55-# handle history like a not caveman
66-# Avoid duplicates
77-HISTCONTROL=ignoredups:erasedups
88-# When the shell exits, append to the history file instead of overwriting it
99-shopt -s histappend
1010-1111-# After each command, append to the history file and reread it
1212-PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
1313-1414-# extend pa for git stuffs
1515-pa() {
1616- case $1 in
1717- g)
1818- cd "${PA_DIR:=${XDG_DATA_HOME:=$HOME/.local/share}/pa}"
1919- git pull
2020- git add --all
2121- git commit -m '*'
2222- git push
2323- cd -
2424- ;;
2525-2626- *)
2727- command pa "$@"
2828- ;;
2929- esac
3030-}
3131-3232-# yep still needed
3333-if ls --version 2>&1 | grep -i gnu >/dev/null
3434-then
3535- alias ls='ls --color=auto '
3636-elif ls --version 2>&1 | grep -i busybox >/dev/null
3737-then
3838- alias ls='ls --color=auto '
3939-fi
4040-4141-if [ -z "${SSH_AGENT_PID}" ]
4242-then
4343- if ! [ -e /tmp/ssh-agent-$USER ]
4444- then
4545- ssh-agent 2>/dev/null >/tmp/ssh-agent-$USER
4646- fi
4747- . /tmp/ssh-agent-$USER >/dev/null
4848-fi
4949-5050-# launch alacritty with no GPU support if on old thinkpad
5151-if [ "$(hostname)" == 'nyx' ]; then
5252- export LIBGL_ALWAYS_SOFTWARE=1
5353-fi
5454-5555-if [ "$(hostname)" == 'nostromo' ]; then
5656- if ! pgrep syncthing &> /dev/null; then
5757- syncthing --no-browser > /dev/null &
5858- fi
5959-fi