blob: f767152cf60cf21d46cdc3b4f0404022015c223d (
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
|
#!/bin/sh
# Filip's aliasrc
# Use $XINITRC variable if file exists.
[ -f "$XINITRC" ] && alias startx="startx \$XINITRC"
# sudo not required for some system commands
sudo_cmds="mount umount sv apt apt-get aptitude dpkg shutdown poweroff reboot cryptsetup"
for command in $sudo_cmds; do
alias \$command="sudo \$command"
done
unset command
# Verbosity and settings that you pretty much just always are going to want.
alias \
cp="cp -iv" \
journalctl="journalctl -xe" \
less="less -XER" \
ls="lsn" \
mkdir="mkdir -pv" \
mv="mv -iv" \
pstree="pstree -np" \
rm="logrm -vI" \
rmdir="rmdir -vp" \
rsync="rsync -vrPlu" \
vim="nvim"
# Colorize commands when possible.
alias \
ccat="highlight --out-format=ansi" \
diff="diff --color=auto" \
dir="dir --color=auto" \
egrep="egrep --color=auto" \
fgrep="fgrep --color=auto" \
grep="grep --color=auto" \
ip="ip -color=auto" \
vdir="vdir --color=auto"
# Making stuff easy to customize and source automatically
alias \
vrc='$EDITOR "$HOME/.config/nvim/init.lua"' \
zal='$EDITOR "$ZDOTDIR/aliasrc" && source "$ZDOTDIR/aliasrc"' \
zen='$EDITOR "$ZDOTDIR/envvarrc" && source "$ZDOTDIR/envvarrc"' \
zrc='$EDITOR "$ZDOTDIR/.zshrc" && source "$ZDOTDIR/.zshrc"'
# Aliases for connecting to server
alias \
ctg="ssh git@rabiega.xyz" \
cts="ssh root@rabiega.xyz" \
ctc="ssh root@chadguide.site"
# Making stuff shorter
alias \
..="cd .." \
bat="batcat" \
copy="xsel -ib" \
fd="fdfind" \
ipy="ipython3" \
lw="librewolf & exit -f" \
nbadd='cat >> "$XDG_CONFIG_HOME"/newsboat/urls << EOF' \
py="python3" \
sd="sudo shutdown -h now" \
sql="pgcli" \
update="sudo apt update && apt upgrade" \
wttr="curl wttr.in/Wroclaw"
# Git aliases
alias \
dotfiles="/usr/bin/git --git-dir=\$HOME/.dotfiles --work-tree=\$HOME" \
ga="git add" \
gc="git commit" \
gp="git push" \
gr="git rm" \
gs="git status"
|