-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
executable file
·239 lines (180 loc) · 6 KB
/
aliases
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# Shell
USER='svartfax'
# Preferred editor for local and remote sessions
if [[ $(uname) == Linux ]]; then
export EDITOR='nvim'
export VISUAL='nvim'
HARDHOME='home'
alias pbcopy='xclip -selection c'
alias pbpaste='xclip -o'
alias vim='nvim'
# alias fd='fdfind'
export VISUAL='nvim'
# alias ack='ack-grep'
else
export EDITOR='nvim'
alias vim='nvim'
HARDHOME='Users'
# alias grep="ggrep"
alias date="gdate"
alias sed="gsed"
fi
alias zc="vim ~/.zshrc"
alias zshconfig="vim ~/.zshrc"
alias zs="source ~/.zshrc"
alias zshsource="source ~/.zshrc"
alias za="nvim ~/.aliases"
alias svim="sudo -E nvim"
alias em="emacsclient -a '' -qc"
alias ema="emacsclient -a '' -qc -e '(org-agenda)'"
alias nv="nvim"
alias rm="rm -i"
alias mv="mv -i"
alias c="clear"
alias transfer="rsync -avh --progress"
alias update="rsync -avh --ignore-existing --partial --update --progress --exclude '.*'"
alias uppa='sh ~/.shell/uppa'
alias cpu='top -o cpu -n 5'
alias px='ps aux|a'
alias solve='sh ~/.shell/solve'
alias in='insect'
alias scr='screen -rd'
alias 1024='sips -Z 1024 *.jpg'
alias jab="wmname LG3D"
alias mp3='youtube-dl -x --audio-format "mp3"'
alias cal="ncal -w"
alias please="sudo"
alias fucking="sudo"
alias p="sudo pacman -Syu"
alias freq="history | cut -c 8- | sort | uniq -c | sort -n -r | head -n 20"
alias vpn="nmcli con up client"
# Zettel
co() {
fc -e -|tail -n${@:-1}|head -n1|cut -f 1 -d " "|tr -d "\n"|pbcopy
}
alias a="ag"
alias af="ag -g"
alias al="a -l"
alias ax="ack -x"
alias ap="ag --passthru"
alias aq="ag -Q"
alias az="ag -l | fzf"
alias av="ag --nobreak --nonumbers --noheading . | fzf"
alias auid="xargs -i ag -g {}"
alias aorphan="af (N-|T-|W-|O-)|ax -L [0-9]{12}|ax -L '(?<=\@)[a-z]*[0-9]{4}'"
alias duplicates="ls|cut -c1-15|uniq -cd"
alias f="find . -type f -not -path '*/\.*'"
alias lt='ls -lhtr | tr -s " " | cut -d " " -f6-'
alias rnd='ls|sort -R'
alias pre='fzf --preview="head -$LINES {}" --preview-window wrap'
alias am='ag --passthru "^\#.*"'
alias pan='pandoc --citeproc --bibliography ~/notes/lib.bib -V papersize:a4 --pdf-engine xelatex '
alias zkviz='~/envs/zkviz/bin/zkviz'
# Google Calendar
alias ca="date;gcalcli agenda"
alias cw="gcalcli calw --monday"
alias cm="gcalcli calm --monday"
alias cq="gcalcli --cal Kalender quick"
alias cr="gcalcli --cal RISE quick"
alias cx="gcalcli --cal Deadlines quick"
# Weather
alias wtr="curl wttr.in"
# workout
alias logbook="cat ~/notes/workout/logbook.md"
alias logedit='vim ~/notes/workout/logbook.md'
# Blog
alias bs="bundle exec jekyll serve"
alias bb="bundle exec jekyll build"
alias bp="rsync -havz --delete _site [email protected]:www/blay.se/"
# Todo
alias tt='rg @todo:a ~/zettel'
alias tb='rg @todo:b ~/zettel'
alias tc='rg @todo:c ~/zettel'
# Git
alias gitdone='git log -p -1|ag @todo:|ap "^-"'
alias gitlogs='git log --pretty=format:"%ar : %s"'
## Commands
alias plus='sh ~/.shell/plus.sh'
alias minus='sh ~/.shell/minus.sh'
alias td='todo.sh -d ~/.todo.cfg'
alias ts='todo.sh -d ~/.todo.cfg schedule'
alias tbw="(t birdseye;echo '\n# Scheduled next week #\n----------------------------';tv 1weeks;echo '\n# Due Soon #\n------------';t until soon;echo '\n# No Dates #\n------------';tv nodate;)"
alias tbm="(t birdseye;echo '\n# Scheduled next 3 weeks #\n----------------------------';tv 3weeks;cal;echo '\n';icf;echo '\n# Due Soon #\n------------';t until soon;echo '\n# No Dates #\n------------';tv nodate;)"
alias tu='todo.sh -d ~/.todo.cfg until'
alias tx='todo.sh -x -d ~/.todo.cfg'
alias tv='todo.sh -x -d ~/.todo.cfg view'
alias t1='(tv past;tv today)'
alias t7='todo.sh -x -d ~/.todo.cfg view 1weeks'
alias te='vim ~/Dropbox/todo/todo.txt'
alias tn='clear && (tv past;tv today)'
alias tf='clear && (tv past;tv today;tv future)'
function tm { ts $1 mv tomorrow; }
## Fix
alias tfix='todo.sh -x -d ~/.todofix.cfg'
alias tfixc='tfix view context'
alias tfixe='vim ~/Dropbox/todo/todofix.txt'
## Defaults
export TODOTXT_DEFAULT_ACTION=ls
export TODOTXT_HOME=/$HARDHOME/$USER/.todo
# source /$HARDHOME/$USER/.todo/todo_completion
# complete -F _todo t
#alias p='python ~/.todo/Punch.py'
#n() {
# echo $(date "+%Y%m%dT%H%M%S => ") "$@" | tee -a ~/Dropbox/todo/notes.txt
# }
# Common cd
alias k='cd ~/zettel && nv'
alias cdl='cd ~/zettel'
alias cdn='cd ~/notes'
alias cdo='cd ~/notes/org'
alias cdm='cd ~/notes/md'
alias cdmd='cd ~/notes/md'
alias cdsh='cd ~/.shell'
alias cdxi='cd ~/notes/omxi.se'
alias cdx='cd ~/notes/latex'
alias cdbl='cd ~/notes/blay.se'
alias cdcv='cd ~/notes/cv.blay.se'
alias cdha='cd ~/notes/hack'
alias cdd='cd ~/Downloads'
alias cdv='cd ~/Videos'
alias cdvb='cd ~/Videos/bjj'
alias cdvd='cd ~/Videos/documentary'
alias cdvf='cd ~/Videos/fiction'
alias cdu='cd ~/Music'
alias cdw='cd ~/wallpapers'
alias cdb='cd ~/builds'
alias cdp='~/papers'
alias cdot='~/dotfiles'
alias cdvim='~/.config/nvim/lua'
alias lib='nvim ~/notes/lib.bib'
alias rn='ranger'
# goto nvim zettel
alias zz='cdm; nv'
# Emacs
alias weekly='sh ~/.shell/weekly'
alias yearly='sh ~/.shell/yearly'
#
# Weird Shit
export GPG_TTY=`tty`
export PATH="$HOME/.shell:$PATH" # Add scripts to path
export PATH="$HOME/.local/bin:$PATH" # Add pip scripts to path
export LESS=-RFX
export GEM_HOME=$HOME/bin/gems
export PATH=$HOME/bin/gems/bin:$PATH
export PATH=$HOME/bin/go/bin:$PATH
export PATH=$HOME/bin/:$PATH
# VCV Rack
export RACK_DIR=~/builds/vcvrack/Rack-SDK
# Golang
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
# NPM Global
export PATH=~/.npm-global/bin:$PATH
# Annot2md path
export PATH=~/bin/annot2md/bin:$PATH
# Completion for kitty
#kitty + complete setup zsh | source /dev/stdin
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND='fd --type file --color=auto --follow --hidden --exclude .git'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export PATH="/opt/homebrew/bin:$HOME/bin/annot2md/bin:$HOME/.npm-global/bin:$HOME/go/bin:$HOME/bin/:$HOME/bin/go/bin:$HOME/bin/gems/bin:$HOME/.local/bin:$HOME/.shell:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:$HOME/.emacs.d/bin:$HOME/.fzf/bin:$PATH"