-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_aliases
128 lines (121 loc) · 4.52 KB
/
bash_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
##########################################
# Custom aliases #
# Will Decide on aliases based on OS #
# Has Variables based for DHCP SSH stuff #
# Make Sure to source this in ~/.bashrc #
##########################################
Username=$(whoami)
# Check for OS
# {{{
if [[ "$(uname -a | grep Ubuntu)" != "" ]]; then
alias install='sudo apt -y install'
alias updateUpgrade='sudo apt -y update && sudo apt -y upgrade'
alias uninstall='sudo apt remove'
alias shutdown='sudo shutdown 0'
fi
if [[ "$(uname -a | grep fc)" != "" || "$(uname -a | grep rawhide)" != "" ]]; then
alias install='sudo dnf -y install'
alias updateUpgrade='sudo dnf -y update'
alias uninstall='sudo dnf remove'
alias shutdown='sudo shutdown 0'
fi
if [[ "$(uname -a | grep ARCH)" != "" ]]; then
alias install='yaourt -S'
#alias install='sudo pacman -S'
alias updateUpgrade='sudo yaourt -Syu && sudo updatedb'
#alias updateUpgrade='sudo pacman -Syu'
alias uninstall='sudo yaourt -Rsc'
#alias uninstall='sudo pacman -Rs'
alias search='sudo yaourt -Ss'
#alias search='sudo pacman -Ss'
alias searchInstalled='sudo yaourt -Qs'
#alias searchInstalled='sudo pacman -Qs'
alias info='sudo yaourt -Si'
#alias info='sudo pacman -Si'
alias infoInstalled='sudo yaourt -Qi'
#alias infoInstalled='sudo pacman -Qi'
alias orphans='sudo yaourt -Qdt'
#alias orphans='sudo pacman -Qdt'
alias facstaff='sudo netctl switch-to uscfacstaff'
alias student='sudo netctl switch-to uscstudent'
alias ethernet='sudo netctl switch-to ethernet-dhcp'
alias brightness='sudo tee /sys/class/backlight/radeon_b10/brightness <<< 5'
alias silver-search='ag'
alias shutdown='sudo -v && /home/'$Username'/.exit.sh && sudo shutdown 0'
fi
# }}}
# C++ stuff
# {{{
if [ -f ~/.example.cc ]
then
alias newc='cp ~/.example.cc ./example.cc'
fi
if [ -f ~/.example.h ]
then
alias newh='cp ~/.example.h ./example.h'
fi
if [ -f ~/.example.cc ] && [ -f ~/.example.h ]
then
alias newc++='newc && newh'
fi
if [ -f ~/.makefile ]
then
alias newmake='cp ~/.makefile ./makefile'
fi
# }}}
# Main Aliases
# {{{
alias vi='vim'
alias ls='ls --color --group-directories-first'
alias lsl='ls -l'
alias lsa='ls -a'
alias all='ls -gAhs | more'
alias cdu='cd ..'
alias pretty='fortune | cowsay | lolcat'
alias sl='sl -aFe'
alias mvcd='function _mvcd(){ mv $1 $2; cd $2;};_mvcd'
#alias cd='function _cd() { cd $1; [ -f .projectName ] && oc project $(cat .projectName) || true; };_cd'
alias email='mutt'
alias newalias='vim ~/.bash_aliases'
alias fuck='sudo'
alias fucking='sudo'
alias uu="updateUpgrade && espeak 'I am finished updating, Your Highness.'"
alias web='w3m www.duckduckgo.com'
alias ub='uu && sudo /home/'$Username'/.backupFileSystem.sh && espeak "I am finished Backing up our data, Your Highness"'
alias backupBash='rsync -vpEPz -e "ssh -p 222" /home/'$Username'/.bashrc /home/'$Username'/.bash_aliases /home/'$Username'/.profile /home/'$Username'/.neofetch.conf '$Username'@'$Leviathan':Documents/RCFiles'
alias updateBash='rsync -rpvEPz -e "ssh -p 222" '$Username'@'$Leviathan':Documents/RCFiles ~'
alias removeCarriageReturns='dos2unix'
alias ifconfig='ip addr'
alias checkOnServer='leviathan df -h /mnt/DataVolume/*'
alias battery='acpi'
alias music='cmus'
alias time='date +%r'
alias removeLastLine="sed -i '$ d'"
alias newnotes='touch $(date +%F).md && vim $(date +%F).md'
alias updateGit='git pull origin master'
alias newGit='git init'
alias pushGit='git push origin master'
alias pdftotext='pdftotext -layout'
alias findLargestFiles='find -type f -exec du -Sh {} + | sort -rh | less '
alias showRecentFolder='ls -lt | less'
alias view='vim -R'
alias compile='g++ -O3 -Wall -std=c++11'
alias numOfCPU='lscpu | grep "CPU(s):" | grep -v NUMA | cut -d " " -f15'
alias makeWithCPU='make -j numOfCPU'
alias gp='while (! git push); do sleep 1; done'
alias tmux='tmux -2' # Allow 256-bit color
alias haste="HASTE_SERVER=https://hastebin.reaves.dev haste"
alias mv='mv -i'
alias rm='rm -i'
alias gitup='git pull && git fetch upstream && git merge upstream/"$(git branch --show-current)" && git push'
alias clp="xclip -selection clipboard"
alias octx='oc config use-context'
alias vimpm='vim *.vpm'
alias showConflicts='git diff --name-only --diff-filter=U'
alias workVPN='nmcli --ask connection up "1 - Red Hat Global VPN"'
alias stripColors='sed -r "s/[[:cntrl:]]\[[0-9]{1,3}m//g"'
alias golint='podman run --rm -v '"$(pwd)"':/app -w /app docker.io/golangci/golangci-lint golangci-lint run -v'
alias open='xdg-open'
alias decompile='_JAVA_AWT_WM_NONREPARENTING=1 ghidra'
alias nn="nvim ${HOME}/Src/NeoNotes/index.md"
# }}}