-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
executable file
·189 lines (140 loc) · 6.15 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
# ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Overwrite confirmation
#alias cp='cp -i'
# Overwrite confirmation
#alias mv='mv -i'
#alias ping='ping -c 4'
alias pingg='ping -c 1000 8.8.8.8'
alias ..='cd ..'
alias ...='cd ../..'
#alias youtube-dl='youtube-dl -t'
alias youtube-mp3='youtube-dl -x -k --audio-format mp3 --audio-quality 0 -o "%(title)s.%(ext)s"'
alias youtube-playlist='youtube-dl -A --autonumber-size 2 -x --audio-format mp3 --audio-quality 0 -i'
alias youtube-best='youtube-dl -f bestvideo+bestaudio'
alias today='cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed '\''s/./#/g'\'') /"'
# Git
alias gits='git status -s'
alias gitd='git diff'
alias gitd2='git log|grep commit|cut -d " " -f2|head -n 2|xargs -n 2 git diff -R'
alias gitl='git log --pretty=format:"%Cred%h %Cgreen%an<%ae>%Cred%d %Creset%s" --graph'
alias gitr='git reset'
alias gitc='git commit -m'
alias gitb='git branch -a'
# remove all merged branches
alias gitb-rm='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d'
# Typo
alias claer='clear'
#empty a file
alias empty="cat /dev/null > "
alias bashreload="source ~/.bashrc"
alias fixfile="find ./ -type f -exec chmod 644 {} +"
alias fixfolder="find ./ -type d -exec chmod 755 {} +"
#lamp in arch
#alias lampp="sudo systemctl restart httpd mysqld memcached"
#largest 50 files in folder
alias largest="find . -type f -print0 | xargs -0 du -s | sort -n | tail -50 | cut -f2 | xargs -I{} du -sh {}"
#folder size
alias foldersize="du -sh"
#zsh
alias zshconfig="vim ~/.zshrc"
alias ohmyzsh="vim ~/.oh-my-zsh"
alias zshreload="source ~/.zshrc"
# Python server
alias server='python3 -m http.server'
alias emulator-jb="emulator -avd 42 -partition-size 300 -system ~/.android/avd/42.avd/system.img"
alias virtualbox-load="sudo modprobe vboxdrv" # vboxnetflt"
# Only for linux
if [[ $CONFIG_OS == "Linux" ]]; then
#debian packaging stuff
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
# Start kate & gedit always silent
alias kate='kate >/dev/null 2>&1'
alias gedit='gedit >/dev/null 2>&1'
# System
alias hibernate="systemctl hibernate"
alias suspend="systemctl suspend"
alias open="xdg-open"
alias ftp-android="systemctl start proftpd"
# With grep
#alias mpd-kill="ps -ef | grep mpd | grep -v grep | awk '{print \$2}' | xargs kill -9"
# Without grep
alias mpd-kill="ps -ef | awk '/mpd/ && !/awk/ {print \$2}' | xargs kill -9"
alias wifi-scan='nmcli dev wifi list'
fi
# pastebin service
alias pastebin="sprunge"
# show public ip
#alias ifconfig-pub="curl ifconfig.me"
alias ifconfig-pub="curl ipecho.net/plain; echo"
alias ifconfig-pub2="curl icanhazip.com"
alias ifconfig-pub3="curl ipv4.ipogre.com"
alias ifconfig-pub4="curl ident.me; echo"
# tmux reload
alias tmux-reload="tmux source-file ~/.tmux.conf"
alias bower='noglob bower'
# vimpager is really slow!
#export PAGER=/usr/bin/vimpager
#alias less=$PAGER
#alias zless=$PAGER
alias grepc="grep --color=always"
alias battery_status="cat /sys/class/power_supply/BAT1/status"
alias webcam="cvlc v4l:// :v4l-vdev='/dev/video1'"
alias catv="vimpager"
alias gdiff="meld"
alias calibre-update="sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c \"import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()\""
# Suffix aliases
if [ $SHELL = 'zsh' ]; then
alias -s js="vim"
alias -s json="vim"
alias -s php="vim"
fi
# gameclosure
#alias gc-timestep="cd modules/devkit-core/modules/timestep/src"
#alias gc-native-android="cd modules/devkit-core/modules/native-android"
#alias gc-native-inspector="node ~/git/gameclosure/nativeinspector/NativeInspector.js && chromium --app=http://localhost:9220"
# webapps
#alias keep="chromium '--profile-directory=Profile 1' --app-id=hmjkmjkepdijhoojdojkdfohbdgmmhki"
#alias vysor="/opt/google/chrome/google-chrome --profile-directory=Default --app-id=gidgenkbbabolejbgbpnhbimgjbffefm"
#alias indiclog="adb logcat | grep `adb shell ps | grep in.androidtweak.inputmethod.indic | cut -c11-15`"
#
#git-edit-unmerged = "git ls-files --unmerged | cut -f2 | sort -u ; vim "
#git-edit-modified = "git ls-files --modified | cut -f2 ; vim `"
alias vlc-kill="ps aux | grep vlc | head -1 | awk '{ print \$2 }' | xargs kill -9"
alias vpn='~/git/dotfiles/vpnns.sh'
# to make aliases available with sudo
alias sudo='sudo '
alias tree='tree -I node_modules'
#alias t='task'
#alias tt='task project:work'
alias icat="kitty +kitten icat"
#alias telegram="epiphany --application-mode --profile='/home/jishnu/.local/share/epiphany-telegram-web-866d24a5263992600b087f5cf3ec3dc149af748f' https://web.telegram.org/"
#alias spotify="spotify --force-device-scale-factor=2"
alias d-laptop="xrandr --output eDP1 --auto --primary --output DP1 --off && set-wallpaper"
# Fix display when external display is not safely disconnected.
# This command will work only on current display. So you should
# get back to XServer before the sleep timeout
alias d-fix="sleep 5; xrandr --output eDP1 --auto -d :0"
# Samsung
#alias d-dual="xrandr --output eDP1 --auto --output DP1 --auto --panning 3200x1800+3200+0 --scale 2x2 --right-of eDP1 && set-wallpaper"
#alias d-monitor="xrandr --output DP1 --auto --primary --panning 0x0 --scale 2x2 --output eDP1 --off && set-wallpaper"
# LG - 3840x2160
alias d-dual="xrandr --output eDP1 --auto --output DP1 --auto --left-of eDP1 && set-wallpaper"
alias d-monitor="xrandr --output DP1 --auto --primary --output eDP1 --off && set-wallpaper"
alias fix-sound='pulseaudio -k && pavucontrol'
alias fix-display="sleep 5; xrandr --output eDP1 --auto -d :0"
alias wiki='ddgr --gb --np \!w'
alias ddgr='ddgr --colors bjdxxy -r in-en'
alias commit_gnucash='cd ~/git/gnucash/ && git add -u && git commit -m "`date +"%d %b"`" && git push origin master && cd -'