-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.mkshrc
52 lines (45 loc) · 1.35 KB
/
.mkshrc
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
# use nvim for everything
set -o vi
SUDO_EDITOR=nvim
VISUAL=nvim
EDITOR=nvim
export EDITOR VISUAL SUDO_EDITOR
# PATH additions
if [ -d "$HOME/.local/bin" ]; then
PATH="$HOME/.local/bin:$PATH"
fi
if [ -d "$HOME/.cargo/bin" ]; then
PATH="$HOME/.cargo/bin:$PATH"
fi
export PATH
# make fzf use fd
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
# aliases
alias doas="sudo"
alias v="nvim"
alias t="todo.sh"
alias rm="rm -I"
alias weather="curl wttr.in"
alias yk-amazon="ykman oath code amazon | cut -d ' ' -f3 | wl-copy"
alias yk-mgh="ykman oath code mgh:[email protected] | cut -d ' ' -f3 | wl-copy"
alias snip="slurp | grim -g - ~/snip.png"
alias mpg="mpg123 -o pulse"
# for storing config files in git repo
alias config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME"
# fascrs request interactive session
alias interactive="salloc -p test --mem 8000 -t 0-8:00"
alias interactive-x11="salloc -p test --x11 --mem 8000 -t 0-8:00"
# janet config
JANET_PATH="$HOME/src/janet"
export JANET_PATH
alias janet-repl="janet -e \"(import spork/netrepl) (netrepl/server)\""
# make random directories to work in
function tmp {
cd "$(mktemp -d /tmp/$1.XXXX)"
}
# set up gpg agent if on linux
if [ -z "$WSLENV" ]; then
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
fi