blob: 5026e442700d081448efe159e01570a0cb35fd4c (
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
|
#!/bin/sh
# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# Use XINITRC variable if file exists.
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
# sudo not required for some system commands.
for x in mount unmount sv pacman updatedb su reboot; do
alias "$x=doas $x"
done
# Verbosity and settings that you pretty much just always are going to want.
alias \
cp="cp -iv" \
mv="mv -iv" \
rm="rm -viI" \
bc="bc -ql" \
mkd="mkdir -pv" \
ffmpeg="ffmpeg -hide_banner"
alias \
ls="ls -ahlN --color=auto --group-directories-first" \
grep="grep --color=auto" \
diff="diff --color=auto"
# My aliases for different programs
alias \
lg="lazygit" \
gpuwatch="watch -n1 nvidia-smi" \
zsource="source $HOME/.config/zsh/.zshrc" \
sdn="sudo shutdown -h now" \
e="$EDITOR" \
v="$EDITOR" \
p="sudo pacman" \
dots="/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME" \
npm="fnm" \
z="zathura" \
mbsync="mbsync -c $MBSYNCRC" \
monerod="monerod --data-dir ""$XDG_DATA_HOME/bitmonero" \
wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts" \
hss="hugo server --noHTTPCache" \
tmux="tmux -u"
# git
alias \
ga="git add" \
gb="git branch -a" \
gc="git commit" \
gcl="git clone" \
gco="git checkout" \
gl="git log" \
gm="git merge" \
gw="git worktree" \
gpl="git pull" \
gph="git push"
# Pushing to multiple git repositories
alias gua="git remote | xargs -L1 git push --all"
alias dua="dots remote | xargs -L1 git --git-dir=$HOME/dotfiles/ --work-tree=$HOME push --all"
# Doas smooth transition
alias sudo="doas"
|