8 alias xc
='xclip -sel clip'
9 alias fonts
="fc-list | sed 's/^.*: //' | sort"
10 alias lsb
="dmesg | egrep '^(cd|wd|sd|fd). at '"
11 alias sc
="rsync -avzhe ssh --progress"
13 [ "$(uname)" = "OpenBSD" ] &&\
14 alias ls='colorls -GA' ||\
15 alias ls='ls --color=always -A'
19 alias wgetf
="wget --tries=100 --continue --content-disposition --trust-server-names -i"
20 alias egyb
=" cd ~/downloads && python /mnt/data/dev/egybest_downloader/egybest_unix.py"
21 alias dwmrc
='cd /mnt/data/hports/src/dwm-6.2/ && vim config.h'
22 alias strc
='cd /mnt/data/hports/src/st-0.8.2/ && vim config.h'
23 alias sl
='cd /mnt/data/hports/src/slstatus/ && vim config.h'
25 alias ya
="youtube-dl -i --add-metadata -f bestaudio"
27 alias yv4
="youtube-dl -i --add-metadata -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'"
28 alias yv7
="youtube-dl -i --add-metadata -f 'bestvideo[height<=720]+bestaudio/best[height<=720]'"
30 alias yvp4
="yv4 -o \"%(autonumber)s-%(title)s.%(ext)s\""
31 alias yvp7
="yv7 -o \"%(autonumber)s-%(title)s.%(ext)s\""
33 [ "$(id -u)" = 0 ] && col="9m" ||
col="24m"
34 export PS1
="\[\033[38;5;$col\]\W \033[38;5;166m\]\$(git branch --show-current 2>/dev/null)\[\033[00m\] "
37 [ -f "$1" ] && case $1 in
38 *.
tar.bz2
) tar xjf
"$1";;
39 *.
tar.gz
) tar xzf
"$1";;
40 *.
tar.xz
) tar xf
"$1";;
46 *.tbz2
) tar xjf
"$1";;
50 *.Z
) uncompress "$1";;
51 *.
tar.zst
) tar -I zstd
-xvf "$1";;
52 *) echo "'$1' cannot be extracted.";;
58 [ -f "$1" ] ||
[ -d "$1" ] && tar -czvf "$dir.tar.gz" -C "$1/.." "$dir"
62 [ -f "$1" ] ||
[ -d "$1" ] &&
63 find "$1" -type d
-exec chmod 700 {} \
; &&
64 find "$1" -type f
-exec chmod 600 {} \
; &&
65 chown
-R $USER "$1" && chgrp
-R $USER "$1"