1 # Bash initialization for interactive non-login shells and
2 # for remote shells (info "(bash) Bash Startup Files").
4 # Export 'SHELL' to child processes. Programs such as 'screen'
5 # honor it and otherwise use /bin/sh.
10 # We are being invoked from a non-interactive shell. If this
11 # is an SSH session (as in "ssh host command"), source
12 # /etc/profile so we get PATH and other essential variables.
13 [[ -n "$SSH_CLIENT" ]] && source /etc
/profile
15 # Don't do anything else.
19 # Source the system-wide file.
22 # from https://unix.stackexchange.com/a/55935
24 cwd
=$
(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
27 # Adjust the prompt depending on whether we're in 'guix environment'.
28 if [ -n "$GUIX_ENVIRONMENT" ]
30 PS1
="\u@\h [env] \$(a_prompt)> "
32 PS1
="\u@\h \$(a_prompt)> "
36 # echo -e "\033[5 q" # blinking
37 # echo -e "\033[6 q" # non-blinking
44 HISTCONTROL
=ignoreboth
45 HISTIGNORE
='ls:l:s:g:[bf]g:history'
46 HISTTIMEFORMAT
='%F %T '
50 alias ls='ls -p --color=auto'
51 alias l
='ls -lh' # long format and human-readable sizes
52 alias ll
='l -A' # long format, all files
53 alias grep='grep --color=auto'
54 alias mpv
="mpv --ytdl-format mp4"
57 alias mbsync
='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
58 alias getmail
='getmail --getmaildir "$XDG_CONFIG_HOME"/getmail --rcfile getmailrc'
59 alias mb
="mbsync csclub; mbsync uwaterloo; mbsync shemshak"
62 alias best
="youtube-dl -f best"
64 alias se
="SUDO_EDITOR=\"emacsclient\" sudo -e"
68 [ -d ${1} ] || git clone https
://aur.archlinux.org
/${1}.git
72 if [ -z "$IS_GUIX_SYSTEM" ]; then
73 if ! pgrep
-u "$USER" ssh-agent
> /dev
/null
; then
74 ssh-agent
> ~
/.ssh-agent-thing
76 if [[ ! "$SSH_AUTH_SOCK" ]]; then
77 eval "$(<~/.ssh-agent-thing)"