-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
57 lines (46 loc) · 1.2 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# default shell prompt
PS1='[\u@\h \W]\$ '
# asdf
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
# core utilites
alias ls='ls --color=auto'
# dotfiles
dtf () {
git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "$@"
}
# cht.sh & fzf
cs () {
curl -s cht.sh/$(curl -s cht.sh/:list | fzf --preview 'curl -s cht.sh/{}' -q "$*")
}
# dict
dict () {
if [ -z "$1" ]; then
echo "syntax: ./dict <word>"
else
curl dict://dict.org/d:$1 | $PAGER
fi
}
# gpg agent
GPG_TTY=$(tty)
export GPG_TTY
# python
alias venv='python -m venv venv'
alias vact='source venv/bin/activate'
alias dact='deactivate'
# pager
export PAGER=less
export LESS_TERMCAP_mb=$'\E[01;38;2;255;108;107m'
export LESS_TERMCAP_md=$'\E[01;38;2;81;175;239m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;38;2;187;194;207;48;2;56;122;167m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[4;38;2;81;175;239m'
# pulseaudio
alias pahd='pactl set-card-profile 46 output:hdmi-stereo'
alias pasp='pactl set-card-profile 46 output:analog-stereo'
# starship
eval "$(starship init bash)"