all repos

dotfiles @ 04331d3e9479176b5ffdfdd8dfc197e052801a37

my dotfiles

config/ranger/rifle.conf (view raw)

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
# vim:ft=cfg

#== Web
ext x?html?, has google-chrome, X, flag f = google-chrome $@
ext x?html?, has firefox,       X, flag f = firefox -- "$@"

#== Script
ext py = python -- "$1"
ext js = node -- "$1"
ext sh = bash -- "$1"

#== Misc
#mime ^text, lable editor = $EDITOR -- "$@"
#mime ^text, label pager = $PAGER -- "$@"


!mime ^text, label editor, ext json|csv|tex|py|rb|js|sh = ${EDITOR} -- "$@"
!mime ^text, label pager,  ext json|csv|tex|py|rb|js|sh = "$PAGER" -- "$@"
name ^[mM]akefile$ = make


#== Video/Audio
mime ^video,       has mpv,  X, flag f = mpv -- "$@"
mime ^video,       has mpv,  X, flag f = mpv --fs -- "$@"
mime ^video|audio, has vlc,  X, flag f = vlc -- "$@"

#== Documents
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
ext pdf, has zathura,       X, flag f = zathura -- "$@"
ext djvu, has zathura,      X, flag f = zathura -- "$@"
ext epub, has zathura,      X, flag f = zathura -- "$@"

#== Images
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image, has feh,          X, flag f = feh      -- "$@"
mime ^image, has ristretto,    X, flag f = ristretto "$@"
mime ^image, has gimp,         X, flag f = gimp     -- "$@"
ext xcf,                       X, flag f = gimp     -- "$@"

#== Archives
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,     has atool = atool --list --each -- "$@" | "$PAGER"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has atool = atool --extract --each -- "$@"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
ext zip, has unzip = unzip -l "$1" | less
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
ext rar, has unrar = unrar l "$1" | less
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done