-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaliasrc
102 lines (88 loc) · 3.73 KB
/
aliasrc
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
#!/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"
[ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC"
# Verbosity and settings that you pretty much just always are going to want.
alias \
cp="cp -iv" \
mv="mv -iv" \
rm="rm -vI" \
bc="bc -ql" \
rsync="rsync -vrPlu" \
mkd="mkdir -pv" \
ffmpeg="ffmpeg -hide_banner" \
:q="exit" \
help="man" \
chd='cd -- "$(choose_from_cwds)" && ls -a' \
rclone="rclone -v" \
# Youtube
alias \
yt="yt-dlp --embed-metadata -i" \
ytautosub="yt --write-auto-sub --sub-lang ja" \
yta="yt -x -f bestaudio/best" \
mp3dl="yta --audio-quality 1 --audio-format mp3" \
ytv="youtube-viewer" \
ytt="yt --skip-download --write-thumbnail" \
ytw="yt --merge-output-format webm -f 'bestvideo[ext=webm]+bestaudio/best[ext=webm]'" \
# Colorize commands when possible.
alias \
ls="ls -hN --color=auto --group-directories-first" \
grep="grep --color=auto" \
ggrep="grep --exclude-dir='.git' --exclude-dir='.mypy_cache'" \
diff="diff --color=auto" \
ccat="highlight --out-format=ansi" \
ip="ip -color=auto" \
# Other stuff
alias \
lf="lfub" \
magit="nvim -c MagitOnly" \
tmux="tmux -f \${XDG_CONFIG_HOME}/tmux/tmux.conf" \
timer='echo "Timer started. Stop with Ctrl-D." && date "+%a, %d %b %H:%M:%S" && time cat && date "+%a, %d %b %H:%M:%S"' \
updxrdb="xrdb -merge \${XDG_CONFIG_HOME}/Xresources" \
genpasswd="openssl rand -base64 21" \
update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg" \
trim="sudo fstrim -v / && sudo fstrim -v /home" \
showpath="echo \$PATH | sed 's/:/\n/g'" \
visoodoo="sudo visudo -f /etc/sudoers.d/01_sudoers" \
res_screencast="xrandr --output DP1 --primary --mode 1920x1080" \
res_normal="xrandr --output DP1 --primary --mode 1920x1200" \
charm="setsid -f pycharm ." \
# dotfiles in git
# https://wiki.archlinux.org/index.php/Dotfiles
# or use ~/.git/info/exclude
alias dot='git --git-dir=${XDG_CONFIG_HOME}/dotfiles/ --work-tree=$HOME'
# Journal
alias \
journal="journalctl --since '3 day ago'" \
errors="journalctl -p err..alert -b -e" \
# Applications
alias \
clock="ncmpcpp -s clock" \
visualizer="ncmpcpp -s visualizer" \
nb="newsboat" \
getmail="offlineimap && notmuch new" \
gm="offlineimap && notmuch new" \
nf="clear && neofetch" \
kakasi_reading="kakasi -i utf8 -o utf8 -u -JH -KH" \
# Morphological analysis
alias \
mecabfurigana="my_mecab '--node-format=%m[%f[7]] ' '--eos-format=\n' '--unk-format=%m '" \
mecabanalyze="my_mecab '--node-format=%m,%f[6],%f[7],%f[0],%f[5]\n' '--unk-format=%m\n' '--eos-format=\n'" \
# Pacman / system
alias \
lsp="pacman -Qett --color=always | less" \
notify-pacman-block="pkill -RTMIN+8 i3blocks" \
upd="sb-popupgrade --no-wait" \
trimlogs='sudo journalctl --vacuum-size=150M' \
pacclean="remorphans && sudo pacman -Sc && trimlogs" \
whathaveidone="tail -500 /var/log/pacman.log | grep -i 'installed\|removed\|graded' --color=never" \
refl='sudo reflector --protocol https --download-timeout 60 --verbose --age 6 --latest 100 --fastest 10 --sort rate --country "$(curl -Ls "ifconfig.co/country")" --save /etc/pacman.d/mirrorlist' \
reflp='sudo reflector --url "https://www.parabola.nu/mirrors/status/json" --protocol https --download-timeout 60 --verbose --age 12 --latest 100 --fastest 10 --sort rate --save /etc/pacman.d/parabola-mirrorlist' \
printsrcinfo="makepkg --printsrcinfo > .SRCINFO" \
unlockme='faillock --user "$USER" --reset' \
listkernels='ls -1 /boot/vmli*' \
egit='sudo etckeeper vcs' \
te='gio trash --empty' \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME}/shell/shortcutrc ; source ${XDG_CONFIG_HOME}/shell/shortcutenvrc ; source ${XDG_CONFIG_HOME}/shell/zshnameddirrc" \