aboutsummaryrefslogtreecommitdiff
path: root/zsh/.zsh/aliases.zsh
blob: 4181b61469bac18a903c76aec449affb36d8c4c4 (plain)
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
#                 ██      
#                ░██      
#  ██████  ██████░██      
# ░░░░██  ██░░░░ ░██████  
#    ██  ░░█████ ░██░░░██ 
#   ██    ░░░░░██░██  ░██ 
#  ██████ ██████ ░██  ░██ 
# ░░░░░░ ░░░░░░  ░░   ░░  
#
#  ▓▓▓▓▓▓▓▓▓▓
# ░▓ author ▓ xero <x@xero.nu>
# ░▓ code   ▓ http://code.xero.nu/dotfiles
# ░▓ mirror ▓ http://git.io/.files
# ░▓▓▓▓▓▓▓▓▓▓
# ░░░░░░░░░░
#
#█▓▒░ aliases
alias l='ls -F --color=auto --group-directories-first'
alias la='ls -lahF --color=auto --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
alias ll='ls -lhF --color=auto --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
alias ls='ls -F --color=auto --group-directories-first'
alias ".."="cd ../"
alias "..."="cd ../.."
alias "../.."="cd ../.."
alias rmrf="rm -rf"
alias psef="ps -ef"
alias mkdir="mkdir -p"
alias cp="cp -r"
alias scp="scp -r"
alias xsel="xsel -b"
alias fuck='sudo $(fc -ln -1)'
alias v="nvim"
alias vi="nvim"
alias emacs="nvim"
alias g="git"
alias ga="git add"
alias gap="git add -p"
alias gc="git commit -m"
alias gs="git status"
alias gd="git diff"
#alias gf="git fetch" To use with hub command
alias gm="git merge"
alias gr="git rebase"
alias gp="git push"
alias gu="git pull"
#alias gu="git unstage" # To use with hub command
#alias gg="git graph"   # To use with hub command
alias gco="git checkout"
alias gcs="git commit -S -m"
alias gcurl="git config --get remote.origin.url"
#alias gpr="hub pull-request" To use with hub command
alias ag="ag --color --color-line-number '0;35' --color-match '46;30' --color-path '4;36'"
alias tree='tree -CAFa -I "CVS|*.*.package|.svn|.git|.hg|node_modules|bower_components" --dirsfirst'
alias mixer="alsamixer"
#alias genplaylist="cd ~/music;find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.mpd/playlists/all.m3u"
alias matrix="cmatrix -b"
alias tempwatch="while :; do sensors; sleep 1 && clear; done;"
#alias term="urxvtc -hold -e " #used for run menu
#alias sprunge="curl -F 'sprunge=<-' http://sprunge.us"
#alias clbin="curl -F 'clbin=<-' https://clbin.com"
alias toiletlist='for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; echo ""; echo "╓───── "$j; echo "╙────────────────────────────────────── ─ ─ "; echo ""; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done'
alias ascii="toilet -t -f 3d"
alias future="toilet -t -f future"
alias rusto="toilet -t -f rusto"
alias rustofat="toilet -t -f rustofat"
alias lol="base64 </dev/urandom | lolcat"
alias pacman="sudo pacman"
alias update="yaourt -Syua"
#alias :q="poweroff"
alias off="poweroff"
alias dldstart="systemctl --user start aria2d.service"
alias dldstop="systemctl --user stop aria2d.service"
alias dldstatus="systemctl --user status aria2d.service"
alias dll="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana list"
alias dllw="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS watch diana list"
alias dla="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana add"
alias diana="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana"
alias dl="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana"
alias dlrm="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana remove"
alias dlrs="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana resume"
alias dlp="DIANA_SECRET_TOKEN=8NuPEM8g6O1vBf6uLyWrcdGFKkI-vBTS diana pause"
alias ZZ="quit"
alias disks='echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─ "; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; df -h;'
#alias todo="bash ~/code/sys/todo"
alias record="ffmpeg -f x11grab -s 1920x1080 -an -r 16 -loglevel quiet -i :0.0 -b:v 5M -y" #pass a filename
#alias nexus="jmtpfs ~/nexus"
alias nullify="~/.scripts/nullify"
alias ff="nullify firefox-developer"
alias lo="nullify libreoffice"
alias notify="~/.scripts/notify"
alias weenotistart="~/.scripts/weechat_notify.sh start"
alias weenotistop="~/.scripts/weechat_notify.sh stop"

alias fixit='sudo rm -f /var/lib/pacman/db.lck'
#alias mirrors='sudo pacman-mirrors -g'
alias printer='sudo system-config-printer'
alias bat="upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep 'percentage:' | awk '{print $2}'"
alias t="task"
alias ts="task sync"
alias tcal="task calendar"
alias thistory="task history"
alias tgraphdaily="task burndown.daily"
alias tgraphweek="task burndown.week"
alias tgraphmonth="task burndown.month"
alias tnext="task +next"
alias tdone="sh ~/.scripts/tdone"
alias tactive="task active"
alias tlistprojects="task projects"
alias tlistallprojects="task rc.list.all.projects=1 projects"
alias tsetnext="task modify $@ +next"
alias tproject="task project:$1"
alias rl='source ~/.zsh/aliases.zsh'
alias rssyoutube="newsbeuter -c /home/neodarz/.newsbeuter/youtube.db -u /home/neodarz/.newsbeuter/urls_youtube -C /home/neodarz/.newsbeuter/youtube_conf"
alias rssliberte="newsbeuter -c /home/neodarz/.newsbeuter/liberte.db -u /home/neodarz/.newsbeuter/urls_liberte -C /home/neodarz/.newsbeuter/liberte_conf"
alias rssblog="newsbeuter -c /home/neodarz/.newsbeuter/blog.db -u /home/neodarz/.newsbeuter/urls_blog -C /home/neodarz/.newsbeuter/blog_conf"
alias rsscode="newsbeuter -c /home/neodarz/.newsbeuter/code.db -u /home/neodarz/.newsbeuter/urls_code -C /home/neodarz/.newsbeuter/code_conf"
alias rsshardware="newsbeuter -c /home/neodarz/.newsbeuter/hardware.db -u /home/neodarz/.newsbeuter/urls_hardware -C /home/neodarz/.newsbeuter/hardware_conf"
alias rssactu="newsbeuter -c /home/neodarz/.newsbeuter/actu.db -u /home/neodarz/.newsbeuter/urls_actu -C /home/neodarz/.newsbeuter/actu_conf"
#alias i3lock="i3lock-fancy"
alias weatherMans="weather -k 0aebbf2d72f2b78f797b650a76c88401 -c -z 47.9955,0.1939"
alias weatherChap="weather -k 0aebbf2d72f2b78f797b650a76c88401 -c -z 47.1778,-1.3416"
alias vpn="sh /home/neodarz/Apps/ipsec-vpn/vpn"
alias cal="ikhal"
alias cals="vdirsyncer sync linuxmaine && vdirsyncer sync haum && ikhal"
alias calsync="vdirsyncer sync perso && vdirsyncer sync pro"
alias mm="offlineimap &&  mutt"

alias stowroot="sudo stow -t /"

alias irc='weenotistart; mosh neodarz.net --ssh="ssh -p 19977" -- tmux a -t 0; weenotistop'

#█▓▒░ dumb tmux trix
alias tsad="printf '\033k┐(T_T)┌\033\\'"
alias tshrug="printf '\033k┐(\`-\`)┌\033\\'"
alias tlol="printf '\033k┐(^0^)┌\033\\'"

#█▓▒░ update mpd database
#function genplaylist() {
#  cd ~/music
#  find . -name '*.mp3' -o -name '*.flac'|sed -e 's%^./%%g' > ~/.config/mpd/playlists/all.m3u
#  mpc clear
#  mpc load all.m3u
#  mpc update
#}

function tm() {
  X=$#
  [[ $X -eq 0 ]] || X=X
  tmux new-session -A -s $X
}

function email() {
	echo $3 | mutt -s $2 $1
}
# colorized cat
function c() {
  for file in "$@"
  do
    pygmentize -O style=sourcerer -f console256 -g "$file" 
  done
}
# colorized less
function le() {
  pygmentize -O style=sourcerer -f console256 -g $1 | less -r 
}
# read markdown files like manpages
function mdm() {
    pandoc -s -f markdown -t man "$*" | man -l -
}
# nullpointer url shortener
#function short() {
#  curl -F"shorten=$*" https://0x0.st
#}

if ! pgrep -u "$USER" ssh-agent > /dev/null; then
    ssh-agent > ~/.ssh-agent-thing
fi
if [[ "$SSH_AGENT_PID" == "" ]]; then
    eval "$(<~/.ssh-agent-thing)"
fi