-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
402 lines (346 loc) · 15.3 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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# -*- mode: fish; lexical-binding: t -*-
#: Arco aliases {{{
### ALIASES ###
#list
alias ls='eza --color=always'
alias lg='eza -lG'
alias lag='eza -lAG'
alias la='eza -A --color=auto'
#alias ll='eza -AlFh --icons'
alias ll='eza -AlFG --icons'
#alias l='eza -lA'
alias l='eza -lAG --icons --color=always'
alias l.="ls -A | egrep '^\.'"
#fix obvious typo's
alias cd..='cd ..'
alias pdw='pwd'
alias udpate='sudo pacman -Syu'
alias upate='sudo pacman -Syu'
alias updte='sudo pacman -Syu'
alias updqte='sudo pacman -Syu'
alias upqll='paru -Syu --noconfirm'
alias upal='paru -Syu --noconfirm'
## Colorize the grep command output for ease of use (good for log files)##
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
#readable output
alias df='df -h'
#keyboard
alias give-me-azerty-be="sudo localectl set-x11-keymap be"
alias give-me-qwerty-us="sudo localectl set-x11-keymap us"
#setlocale
alias setlocale="sudo localectl set-locale LANG=en_US.UTF-8"
alias setlocales="sudo localectl set-x11-keymap be && sudo localectl set-locale LANG=en_US.UTF-8"
#pacman unlock
alias unlock="sudo rm /var/lib/pacman/db.lck"
alias rmpacmanlock="sudo rm /var/lib/pacman/db.lck"
#arcolinux logout unlock
alias rmlogoutlock="sudo rm /tmp/arcologout.lock"
#which graphical card is working
alias whichvga="/usr/local/bin/arcolinux-which-vga"
#free
alias free="free -mt"
#continue download
alias wget="wget -c --hsts-file=\"$XDG_DATA_HOME/wget-hsts\""
#userlist
alias userlist="cut -d: -f1 /etc/passwd | sort"
#merge new settings
alias merge="xrdb -merge ~/.Xresources"
# Aliases for software managment
# pacman
# alias pacman="sudo pacman --color auto"
alias update="sudo pacman -Syu --disable-download-timeout"
# paru as aur helper - updates everything
alias pksyua="paru -Syu --noconfirm"
alias upall="paru -Syu --noconfirm"
#ps
alias psa="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
#grub update
alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
#grub issue 08/2022
alias install-grub-efi="sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi"
# add new fonts
alias update-fc='sudo fc-cache -fv'
#copy/paste all content of /etc/skel over to home folder - backup of config created - beware
#skel alias has been replaced with a script at /usr/local/bin/skel
#backup contents of /etc/skel to hidden backup folder in home/user
alias bupskel='cp -Rf /etc/skel ~/.skel-backup-$(date +%Y.%m.%d-%H.%M.%S)'
#copy shell configs
# alias cb='cp /etc/skel/.bashrc ~/.bashrc && echo "Copied."'
alias cz='cp /etc/skel/.zshrc ~/.zshrc && exec zsh'
alias cf='cp /etc/skel/.config/fish/config.fish ~/.config/fish/config.fish && echo "Copied."'
#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.'"
alias tofish="sudo chsh $USER -s /bin/fish && echo 'Now log out.'"
#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'"
alias toly="sudo pacman -S ly --noconfirm --needed ; sudo systemctl enable ly.service -f ; echo 'Ly is active - reboot now'"
alias togdm="sudo pacman -S gdm --noconfirm --needed ; sudo systemctl enable gdm.service -f ; echo 'Gdm is active - reboot now'"
alias tolxdm="sudo pacman -S lxdm --noconfirm --needed ; sudo systemctl enable lxdm.service -f ; echo 'Lxdm is active - reboot now'"
# kill commands
# quickly kill conkies
alias kc='killall conky'
# quickly kill polybar
alias kp='killall polybar'
# quickly kill picom
alias kpi='killall picom'
#hardware info --short
alias hw="hwinfo --short"
#audio check pulseaudio or pipewire
alias audio="pactl info | grep 'Server Name'"
#skip integrity check
alias paruskip='paru -S --mflags --skipinteg'
alias yayskip='yay -S --mflags --skipinteg'
alias trizenskip='trizen -S --skipinteg'
#check vulnerabilities microcode
alias microcode='grep . /sys/devices/system/cpu/vulnerabilities/*'
#get fastest mirrors in your neighborhood
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
alias mirrord="sudo reflector --latest 30 --number 10 --sort delay --save /etc/pacman.d/mirrorlist"
alias mirrors="sudo reflector --latest 30 --number 10 --sort score --save /etc/pacman.d/mirrorlist"
alias mirrora="sudo reflector --latest 30 --number 10 --sort age --save /etc/pacman.d/mirrorlist"
#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"
alias ram='rate-mirrors --allow-root --disable-comments arch | sudo tee /etc/pacman.d/mirrorlist'
alias rams='rate-mirrors --allow-root --disable-comments --protocol https arch | sudo tee /etc/pacman.d/mirrorlist'
#enabling vmware services
alias start-vmware="sudo systemctl enable --now vmtoolsd.service"
#shopt
#shopt -s autocd # change to named directory
#shopt -s cdspell # autocorrects cd misspellings
#shopt -s cmdhist # save multi-line commands in history as single line
#shopt -s dotglob
#shopt -s histappend # do not overwrite history
#shopt -s expand_aliases # expand aliases
#youtube download
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 "
#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"
#iso and version used to install ArcoLinux
alias iso="cat /etc/dev-rel | awk -F '=' '/ISO/ {print $2}'"
alias isoo="cat /etc/dev-rel"
#Cleanup orphaned packages
# alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
alias cleanup='sudo pacman -Rcns `pacman -Qqd | pacman -Rsu --print -`'
# alias cleanup='sudo pacman -Rns $(pacman -Qtdq) &>/dev/null'
#clear
alias clean="clear; seq 1 $(tput cols) | sort -R | sparklines | lolcat"
#search content with ripgrep
alias rg="rg -i --sort path"
#get the error messages from journalctl
alias jctl="journalctl -p 3 -xb"
#nano for important configuration files
#know what you do in these files
alias nlxdm="sudo $EDITOR /etc/lxdm/lxdm.conf"
alias nlightdm="sudo $EDITOR /etc/lightdm/lightdm.conf"
alias npacman="sudo $EDITOR /etc/pacman.conf"
alias ngrub="sudo $EDITOR /etc/default/grub"
alias nconfgrub="sudo $EDITOR /boot/grub/grub.cfg"
alias nmkinitcpio="sudo $EDITOR /etc/mkinitcpio.conf"
alias nmirrorlist="sudo $EDITOR /etc/pacman.d/mirrorlist"
alias narcomirrorlist="sudo $EDITOR /etc/pacman.d/arcolinux-mirrorlist"
alias nsddm="sudo $EDITOR /etc/sddm.conf"
alias nsddmk="sudo $EDITOR /etc/sddm.conf.d/kde_settings.conf"
alias nfstab="sudo $EDITOR /etc/fstab"
alias nnsswitch="sudo $EDITOR /etc/nsswitch.conf"
alias nsamba="sudo $EDITOR /etc/samba/smb.conf"
alias ngnupgconf="sudo $EDITOR /etc/pacman.d/gnupg/gpg.conf"
alias nhosts="sudo $EDITOR /etc/hosts"
alias nhostname="sudo $EDITOR /etc/hostname"
alias nb="$EDITOR ~/.bashrc"
alias nz="$EDITOR ~/.zshrc"
alias nf="$EDITOR ~/.config/fish/config.fish"
alias nneofetch="$EDITOR ~/.config/neofetch/config.conf"
#reading logs with bat
alias lcalamares="bat /var/log/Calamares.log"
alias lpacman="bat /var/log/pacman.log"
alias lxorg="bat /var/log/Xorg.0.log"
alias lxorgo="bat /var/log/Xorg.0.log.old"
#gpg
#verify signature for isos
alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
alias fix-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"
alias fix-gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
alias fix-keyserver="[ -d ~/.gnupg ] || mkdir ~/.gnupg ; cp /etc/pacman.d/gnupg/gpg.conf ~/.gnupg/ ; echo 'done'"
#fixes
# alias fix-permissions="sudo chown -R $USER:$USER ~/.dotfiles/ ~/.local"
#maintenance
alias big="expac -H M '%m\t%n' | sort -h | nl"
alias downgrada="sudo downgrade --ala-url https://ant.seedhost.eu/arcolinux/"
#hblock (stop tracking with hblock)
#use unhblock to stop using hblock
alias unhblock="hblock -S none -D none"
#systeminfo
alias probe="sudo -E hw-probe -all -upload"
alias sysfailed="systemctl list-units --failed"
#shutdown or reboot
alias ssn="sudo shutdown now"
alias sr="sudo reboot"
#update betterlockscreen images
alias bls="betterlockscreen -u /usr/share/backgrounds/arcolinux/"
#give the list of all installed desktops - xsessions desktops
alias xd="ls /usr/share/xsessions"
#btrfs aliases
alias btrfsfs="sudo btrfs filesystem df /"
alias btrfsli="sudo btrfs su li / -t"
#snapper aliases
alias snapcroot="sudo snapper -c root create-config /"
alias snapchome="sudo snapper -c home create-config /home"
alias snapli="sudo snapper list"
alias snapcr="sudo snapper -c root create"
alias snapch="sudo snapper -c home create"
#Leftwm aliases
alias lti="leftwm-theme install"
alias ltu="leftwm-theme uninstall"
alias lta="leftwm-theme apply"
alias ltupd="leftwm-theme update"
alias ltupg="leftwm-theme upgrade"
#remove
alias rmgitcache="rm -r ~/.cache/git"
alias ascii="awk 'BEGIN {for (i = 33; i < 129; i++) printf \"%3d 0x%02x %c\n\", i, i, i}' | nbat"
alias mdp="mkdir -p"
alias db="TERM=xterm-256color distrobox"
alias dbx="TERM=xterm-256color distrobox"
alias xhost-thing="xhost +si:localuser:$USER"
alias chm="chmod +x"
alias killall="pkill" # for some reason kilalll doesn't work on nixos
alias sys=systemctl
alias sysu="systemctl --user"
alias syu="systemctl --user"
alias sy="systemctl --user"
alias httpie="http" # virtualenv doesn't work with python 3.11, using the binary for now
alias https="http"
# alias dw="dw -c --done \"\" --left \"\" --current \"\" --color-done \"green\" --color-left \"blue\" --color-current \"yellow\" --icon-border \"| |\" "
alias dw="dw -c --done \"\" --left \"\" --current \"\" --color-done \"red\" --color-left \"blue\" --color-current \"yellow\" --icon-border \" \" "
alias explicit-packages="paru -Qent"
alias octave="octave -H -q" # no command history, no startup messages
alias dust="dust -r" # dust is in dotfiles/scripts
alias bat="bat --plain --number --color=always"
alias ncbat="bat --plain --color never"
alias plog="podman logs -f"
alias docker=podman
alias notif-daemon="busctl --user list | grep org.freedesktop.Notifications"
alias nbat="bat --plain --color=always" # don't show line numbers
alias batn="bat --plain --color=always" # don't show line numbers
alias grh="git reset --hard"
alias gd="git diff"
alias gp='git push origin $(git branch | awk "{printf \$2} ")'
alias ssh-pi="term && ssh [email protected]"
alias cdwm="cd ~/.config/arco-chadwm/chadwm"
alias tor-browser="env HOME=~/Downloads/Tor ~/Downloads/Tor/tor-browser/Browser/start-tor-browser "
# alias nf="neofetch --ascii_distro Archlinux"
alias nf=neofetch
alias cling="~/Downloads/cling_2020-11-05_ROOT-ubuntu2004/bin/cling"
alias eho="echo"
alias ewwd="eww -c $HOME/.dotfiles/eww/dashboard/ daemon"
alias eww-dash="eww -c $HOME/.dotfiles/eww/dashboard/"
alias eww-bar="eww -c $HOME/.dotfiles/eww/bar/"
alias ewwb="eww -c $HOME/.dotfiles/eww/bar/ daemon"
alias eco="echo"
alias cdot="cd $HOME/.dotfiles"
alias cd-="cd -"
alias dot="cd ~/.dotfiles"
alias am="appman" # from dotfiles/scripts
alias lsblk="lsblk -o name,mountpoint,label,size"
alias star=starship
alias swb="swaybg -i"
alias sww="swww"
alias swwww="swww"
#alias nvim=lvim
alias v="notify-send 'Vim? Am I a joke to you??' && ~/.dotfiles/scripts/emt"
alias nvim=v
alias vim=nvim
alias compile-run="compile" # from dotfiles/scripts
alias ds="doom sync" # du won't work tho
alias c="cd"
alias wh="which"
alias killalll=killall # embarassing typo
alias ka="killall"
alias gcc="gcc -g"
alias ggcc="gcc -g"
alias gccg="gcc -g"
alias edit-linker="nvim ~/.dotfiles/scripts/linker"
alias pr=procs
alias wi="wezterm imgcat"
alias ki="kitten icat" # WezTerm imgcat doesnt work on XWayland
alias s=sudo
alias gdb="gdb -q"
# alias flatpak="flatpak --user" # add flathub as a user repo only, NOT the system repo.. this will do
alias ke="killall emacs"
alias ga.="git add . "
alias gaa="git add . "
alias gro="git remote get-url origin "
alias gso="git remote set-url origin "
alias rrm="rm -rf"
alias rmr="rm -rf"
alias paru="yay --answerdiff None --answerclean None --removemake --sudoloop"
alias pacman-checkmissing="pacman -Qk 2>/dev/null | rg -e \"[^0] missing files\""
alias yay="yay --sudoloop"
# alias aura="sudo aura"
# alias yay="sudo aura"
# alias paru="sudo aura"
alias rmrf="sudo rm -rf"
alias chup="pacman -Qu" # checkupdates
alias cu="checkupdates"
alias tou=touch
alias zshc="emc $HOME/.dotfiles/shells/zsh/zshrc"
# alias zshc="nvim $HOME/.dotfiles/shells/zsh/zshrc"
alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
alias show-bgs="feh -d ~/.dotfiles/wallpapers" # or the ~/.wallpapers symlink
# alias what="file $@"
# alias search="sudo find / -iname $@" # or `"sudo fd / --glob -H $@"`
# alias open="detach xdg-open"
alias fbg="feh --bg-fill"
#alias fd="sudo fd --glob"
alias ptp=ptpython
alias ptip=ptipython
alias pti=ptipython
alias venv="python -m venv"
alias hde="hyprctl dispatch exit"
alias gres="git restore"
alias gcl="git clone --depth 1"
# alias nativefier-custom = "cd ~/Nativefier && nativefier "$1" --disable-dev-tools --single-instance --tray --disable-gpu"
alias gs="git status"
alias ska="sudo killall"
alias faillock="faillock --user $USER --reset"
alias du="du -d 2 -h ./ 2>/dev/null"
alias start="systemctl start"
alias stop="systemctl stop"
alias restart="systemctl restart"
alias startu="systemctl --user start"
alias stopu="systemctl --user stop"
alias restartu="systemctl --user restart"
alias start-sshd="sudo systemctl start sshd"
alias stop-sshd="sudo systemctl stop sshd &> /dev/null"
alias restart-sshd="stop-libvirtd && start-libvirtd"
alias cd-blog="cd ~/Git/blog/zstgblog/"
# alias get-ip="echo -e 'Public: $(curl ifconfig.me 2>/dev/null)\nPrivate: $(ip a | grep -E 'inet 192\.168\.0\.[0-9]+' | awk '{print $2}' | cut -d/ -f1)'"
# NIXOS ALIASES
alias nixos-edit="nano $HOME/.dotfiles/nixos/configuration.nix"
# alias rebuild="clear && sudo nixos-rebuild --fast "
alias rebuild-switch="clear && sudo nixos-rebuild --fast switch"
alias nixos-test="clear && sudo nixos-rebuild --fast build"
alias rebuild-test="clear && sudo nixos-rebuild --fast test"
alias flake-rebuild="sudo nixos-rebuild --flake $HOME/.dotfiles/nixos --impure" # defaults to rebuilding current device's config
alias flake-rebuild-switch="sudo nixos-rebuild --flake $HOME/.dotfiles/nixos --impure switch" # defaults to rebuilding current device's config
alias flake-rebuild-test="sudo nixos-rebuild --flake $HOME/.dotfiles/nixos#nixOS --impure test"
# alias nix-shell="HOME=/home/stig/.cache nix-shell -p"
alias nix-shell="HOME=/home/stig/.cache nix-shell"
alias nix-shellp="HOME=/home/stig/.cache nix-shell -p"
alias nix-search="nix search nixpkgs"
alias ai="appimage-run"
alias ai-run="appimage-run"
# alias gcc="clang"
# alias g++="clang++"