summaryrefslogtreecommitdiff
path: root/.config/ranger/rifle.conf
blob: c5ae65442e644659232360404e61ae5220557fdd (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
# vim: ft=cfg

# web
ext x?html?, has librewolf,			X, flag f = librewolf -- "$@"
ext x?html?, has firefox,			X, flag f = firefox -- "$@" 

# editor
mime ^text,  label editor = ${VISUAL:-$EDITOR} -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"

# misc
ext 1                         = man "$1"
ext exe                       = wine "$1"

# scripts
ext py  = python3 -- "$1"
ext pl  = perl -- "$1"
ext rb  = ruby -- "$1"
ext js  = node -- "$1"
ext sh  = sh -- "$1"
ext php = php -- "$1"

# media
mime ^audio|ogg$, terminal, has mpv      = mpv -- "$@"
mime ^video,       has mpv,      X, flag f = mpv -- "$@"

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

# images
mime ^image, has imv,       X, flag f = imv -- "$@"
ext xcf,                    X, flag f = gimp -- "$@"

# fallbacks
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"

# xdg-open
label open, has xdg-open = xdg-open -- "$@"
label open, has open     = open -- "$@"

# execute
mime application/x-executable = "$1"