-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
246 lines (196 loc) · 7.21 KB
/
.bashrc
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
240
241
242
243
244
245
246
#
# ~/.bashrc
#
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec startx
fi
#Ibus settings if you need them
#type ibus-setup in terminal to change settings and start the daemon
#delete the hashtags of the next lines and restart
#export GTK_IM_MODULE=ibus
#export XMODIFIERS=@im=dbus
#export QT_IM_MODULE=ibus
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export HISTCONTROL=ignoreboth:erasedups
PS1='[\u@\h \W]\$ '
if [ -d '$HOME/.bin' ] ;
then PATH='$HOME/.bin:$PATH'
fi
if [ -d '$HOME/.local/bin' ] ;
then PATH='$HOME/.local/bin:$PATH'
fi
# Path to your Snap installation.
export PATH=$PATH:/snap/bin
##BTRFS Stuff
alias btrfs-fs='sudo btrfs filesystem df /'
alias btrfs-ls='sudo btrfs su li / -t'
##Snapper Stuff
alias snapls='sudo snapper list'
##Cmatrix thing
alias matrix='cmatrix -s -C cyan'
#iso and version used to install ArcoLinux
alias iso='cat /etc/dev-rel | awk -F '=' '/ISO/ {print $2}''
#ignore upper and lowercase when TAB completion
bind 'set completion-ignore-case on'
#systeminfo
alias probe='sudo -E hw-probe -all -upload'
# Replace ls with exa
alias ls='exa -al --color=always --group-directories-first --icons' # preferred listing
alias la='exa -a --color=always --group-directories-first --icons' # all files and dirs
alias ll='exa -l --color=always --group-directories-first --icons' # long format
alias lt='exa -aT --color=always --group-directories-first --icons' # tree listing
alias l='exa -lah --color=always --group-directories-first --icons' # tree listing
#pacman unlock
alias unlock='sudo rm /var/lib/pacman/db.lck'
#available free memory
alias free='free -mt'
#continue download
alias wget='wget -c'
#readable output
alias df='df -h'
#userlist
alias userlist='cut -d: -f1 /etc/passwd'
#Pacman for software managment
alias search='sudo pacman -Qs'
alias remove='sudo pacman -R'
alias install='sudo pacman -S'
alias linstall='sudo pacman -U '
alias update='sudo pacman -Syyu'
alias clrcache='sudo pacman -Scc'
alias updb='paru && sudo pacman -Sy'
alias orphans='sudo pacman -Rns $(pacman -Qtdq)'
#Paru as aur helper - updates everything
alias pget='paru -S '
alias prm='paru -Rs '
alias psr='paru -Ss '
alias upall='paru -Syyu --noconfirm'
#Flatpak Update
alias fpup='flatpak update'
#Snap Update
alias sup='sudo snap refresh'
#switch between bash and zsh
alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'"
#skip integrity check
alias paruskip='paru -S --mflags --skipinteg'
alias yayskip='yay -S --mflags --skipinteg'
#Easter Eggs
alias a1='figlet -c -w 100 Alan1000'
alias gk='figlet -c -w 100 GamerKing64'
alias digi='figlet -c -w 100 Digidude512'
alias imr='figlet -c -f banner -w 111 I am / root'
#grub update
alias grubup='sudo grub-mkconfig -o /boot/grub/grub.cfg'
## Fixes
alias xero-mirrors='cd /etc/pacman.d/ && sudo rm xero-mirrorlist && sudo wget https://raw.githubusercontent.com/TechXero/Store/master/scripts/xero-mirrorlist'
#get fastest mirrors in your neighborhood
alias ram='rate-mirrors --allow-root --disable-comments --protocol https arch | sudo tee /etc/pacman.d/mirrorlist'
alias reft='sudo systemctl enable reflector.service reflector.timer && sudo systemctl start reflector.service reflector.timer'
#our experimental - best option for the moment
alias mirrorx="sudo reflector --age 6 --latest 20 --fastest 20 --threads 5 --sort rate --protocol https --save /etc/pacman.d/mirrorlist"
alias mirrorxx="sudo reflector --age 6 --latest 20 --fastest 20 --threads 20 --sort rate --protocol https --save /etc/pacman.d/mirrorlist"
#Bash aliases
alias mkfile='touch'
alias thor='sudo thunar'
alias jctl='journalctl -p 3 -xb'
alias ssaver='xscreensaver-demo'
alias reload='cd ~ && source ~/.bashrc'
alias pingme='ping -c64 github.com'
alias cls='clear && neofetch'
alias traceme='traceroute github.com'
#hardware info --short
alias hw='hwinfo --short'
#youtube-dl
alias yta-aac="yt-dlp --extract-audio --audio-format aac "
alias yta-best="yt-dlp --extract-audio --audio-format best "
alias yta-flac="yt-dlp --extract-audio --audio-format flac "
alias yta-mp3="yt-dlp --extract-audio --audio-format mp3 "
alias ytv-best='yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 '
#GiT command
alias gc='git clone '
#userlist
alias userlist='cut -d: -f1 /etc/passwd'
#Copy/Remove files/dirs
alias rmd='rm -r'
alias srm='sudo rm'
alias srmd='sudo rm -r'
alias cpd='cp -R'
alias scp='sudo cp'
alias scpd='sudo cp -R'
#nano
alias nz='$EDITOR ~/.zshrc'
alias bashrc='sudo nano ~/.bashrc'
alias nsddm='sudo nano /etc/sddm.conf'
alias pconf='sudo nano /etc/pacman.conf'
alias mkpkg='sudo nano /etc/makepkg.conf'
alias ngrub='sudo nano /etc/default/grub'
alias smbconf='sudo nano /etc/samba/smb.conf'
alias nlightdm='sudo $EDITOR /etc/lightdm/lightdm.conf'
alias nmirrorlist='sudo nano /etc/pacman.d/xero-mirrorlist'
alias nsddmk='sudo $EDITOR /etc/sddm.conf.d/kde_settings.conf'
#cd/ aliases
alias home='cd ~'
alias etc='cd /etc/'
alias music='cd ~/Music'
alias vids='cd ~/Videos'
alias conf='cd ~/.config'
alias desk='cd ~/Desktop'
alias pics='cd ~/Pictures'
alias dldz='cd ~/Downloads'
alias docs='cd ~/Documents'
alias sapps='cd /usr/share/applications'
alias lapps='cd ~/.local/share/applications'
#verify signature for isos
alias gpg-check='gpg2 --keyserver-options auto-key-retrieve --verify'
#receive the key of a developer
alias gpg-retrieve='gpg2 --keyserver-options auto-key-retrieve --receive-keys'
#switch between lightdm and sddm
alias tolightdm='sudo pacman -S lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings --noconfirm --needed ; sudo systemctl enable lightdm.service -f ; echo 'Lightm is active - reboot now''
alias tosddm='sudo pacman -S sddm --noconfirm --needed ; sudo systemctl enable sddm.service -f ; echo 'Sddm is active - reboot now''
#Recent Installed Packages
alias rip='expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl'
alias riplong='expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -3000 | nl'
## Tool Related
alias fixme='sh /usr/local/bin/data/fixes'
alias shell='sh /usr/local/bin/data/shell'
alias gaming='sh /usr/local/bin/data/gaming'
alias riceme='sh /usr/local/bin/data/ricez'
#Package Info
alias info='sudo pacman -Si '
alias infox='sudo pacman -Sii '
##Refresh Keys
alias rkeys='sudo pacman-key --refresh-keys'
#PiAi
alias xlai='sudo -E /usr/lib/xero-piai/xero-piai --setupmode'
#shutdown or reboot
alias sr='sudo reboot'
alias ssn='sudo shutdown now'
alias ci='git clone https://github.com/rayvermey/CI'
# # ex = EXtractor for all kinds of archives
# # usage: ex <file>
ex ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*.deb) ar x $1 ;;
*.tar.xz) tar xf $1 ;;
*.tar.zst) unzstd $1 ;;
*) echo ''$1' cannot be extracted via ex()' ;;
esac
else
echo ''$1' is not a valid file'
fi
}
clear && neofetch