my dotz
1#!/bin/sh
2
3PS1='$(prompt) \$ '
4
5# extend pa for git stuffs
6pa() {
7 case $1 in
8 g)
9 cd "${PA_DIR:=${XDG_DATA_HOME:=$HOME/.local/share}/pa}"
10 git pull
11 git add --all
12 git commit -m '*'
13 git push
14 cd -
15 ;;
16
17 *)
18 command pa "$@"
19 ;;
20 esac
21}
22
23# yep still needed
24if ls --version 2>&1 | grep -i gnu >/dev/null
25then
26 alias ls='ls --color=auto '
27elif ls --version 2>&1 | grep -i busybox >/dev/null
28then
29 alias ls='ls --color=auto '
30fi
31
32if [ -z "${SSH_AGENT_PID}" ]
33then
34 if ! [ -e /tmp/ssh-agent-$USER ]
35 then
36 ssh-agent 2>/dev/null >/tmp/ssh-agent-$USER
37 fi
38 . /tmp/ssh-agent-$USER >/dev/null
39fi
40
41# launch alacritty with no GPU support if on old thinkpad
42if [ "$(hostname)" == 'nyx' ]; then
43 export LIBGL_ALWAYS_SOFTWARE=1
44fi
45
46if [ "$(hostname)" == 'nostromo' ]; then
47 if ! pgrep syncthing &> /dev/null; then
48 syncthing --no-browser > /dev/null &
49 fi
50fi
51
52# chef stuff
53alias be='bundle exec'