-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
46 lines (39 loc) · 1.34 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
#! /bin/sh
alias ..='cd ..'
alias huhu='echo -e "\a"'
alias la='ls -AF'
alias lf='ls -F'
alias ll='ls -AhlF'
alias mkdir='mkdir -p'
test -x "$(command -v ag)" && alias ag='ag --nocolor'
test -x "$(command -v emacs)" && alias emacs='emacs -nw'
test -x "$(command -v git)" && alias g=git
test -x "$(command -v nvim)" && alias n=nvim
test -x "$(command -v tmux)" && alias t=tmux
test -x "$(command -v vim)" && alias v=vim
test -x "$(command -v xsct)" && alias sct=xsct
#test -x "$(command -v mpv)" && alias mpv='mpv --stop-screensaver=yes --x11-pypass-compositor=never'
if [ -x "$(command -v youtube-dl)" ]
then
# [protocol!=http_dash_segments]
yt-dl()
{
youtube-dl --add-metadata -f 'bestvideo[height<=1080]+bestaudio' -o '%(uploader)s - %(title)s.%(ext)s' --compat-options filename-sanitization "$@"
}
# [protocol!=http_dash_segments]
yt-pl()
{
youtube-dl --add-metadata -f 'bestvideo[height<=1080]+bestaudio' -i -o '%(playlist_index)03d-%(title)s.%(ext)s' --compat-options filename-sanitization "$@"
}
yt-ns()
{
youtube-dl --add-metadata -f best -o '%(uploader)s - %(title)s.%(ext)s' --compat-options filename-sanitization "$@"
}
fi
if [ -x "$(command -v fuzzy-cd)" ] && [ -x "$(command -v fzf)" ]
then
j()
{
fuzzy_cd_dir="$(fuzzy-cd "$1")" && cd "$fuzzy_cd_dir"
}
fi