fontconfig: use hintfull
[~bandali/configs] / .bashrc
... / ...
CommitLineData
1# If not running interactively, don't do anything else
2[[ $- != *i* ]] && return
3
4# from https://unix.stackexchange.com/a/55935
5a_prompt() {
6 cwd=$(sed -e "s:$HOME:~:" -e "s:\(\.\?[^/]\)[^/]*/:\1/:g" <<<$PWD)
7 printf $cwd
8}
9PS1="\u@\h \$(a_prompt)> "
10
11# i-beam cursor
12# echo -e "\033[5 q" # blinking
13# echo -e "\033[6 q" # non-blinking
14
15# various bash tweaks
16shopt -s histappend
17shopt -s cmdhist
18HISTSIZE=
19HISTFILESIZE=
20HISTCONTROL=ignoreboth
21HISTIGNORE='ls:l:s:g:[bf]g:history'
22HISTTIMEFORMAT='%F %T '
23stty stop ""
24
25# aliases
26alias ls='ls --color=auto'
27alias l='ls -lh' # long format and human-readable sizes
28alias ll='l -A' # long format, all files
29alias mpv="mpv --ytdl-format mp4"
30alias mv="mv -iv"
31alias cp="cp -iv"
32alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
33alias getmail='getmail --getmaildir "$XDG_CONFIG_HOME"/getmail --rcfile getmailrc'
34alias mb="mbsync csclub; mbsync uwaterloo; mbsync shemshak"
35alias gm="getmail"
36alias m="mb; gm"
37alias best="youtube-dl -f best"
38alias e="$EDITOR"
39alias se="SUDO_EDITOR=\"emacsclient\" sudo -e"
40
41aur() {
42 cd ~/usr/builds
43 [ -d ${1} ] || git clone https://aur.archlinux.org/${1}.git
44 cd ${1}
45}
46
47# fzf
48#include /usr/share/fzf/key-bindings.bash
49#include /usr/share/fzf/completion.bash
50
51if ! pgrep -u "$USER" ssh-agent > /dev/null; then
52 ssh-agent > ~/.ssh-agent-thing
53fi
54if [[ ! "$SSH_AUTH_SOCK" ]]; then
55 eval "$(<~/.ssh-agent-thing)"
56fi