aboutsummaryrefslogtreecommitdiffstats
path: root/.config/ranger
diff options
context:
space:
mode:
Diffstat (limited to '.config/ranger')
-rw-r--r--.config/ranger/rifle.conf133
1 files changed, 40 insertions, 93 deletions
diff --git a/.config/ranger/rifle.conf b/.config/ranger/rifle.conf
index 7093f3d..51422f3 100644
--- a/.config/ranger/rifle.conf
+++ b/.config/ranger/rifle.conf
@@ -1,5 +1,3 @@
- # vim: ft=cfg
-#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
@@ -48,56 +46,29 @@
# Note: When using rifle in ranger, there is an additional flag "c" for
# only running the current file even if you have marked multiple files.
-#-------------------------------------------
-# Misc
-#-------------------------------------------
+# music conversion and import
+directory, has flac2all = flac2all vorbis "$1" -v quality=10 -o "$1/converted"
+directory, has beet = beet imp -t "$1"
-# handle man pages. first here to override edit as default
+# view man pages
ext 1|2|3|4|5|6|7|8|9 = man "$@"
-# Define the "editor" for text files as first action
-mime ^text, label editor = "$EDITOR" -- "$@"
-mime ^text, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@"
+# editor for text files
+mime ^text, label editor = "$EDITOR" -- "$@"
+mime ^text, has urxvt, X, flag f = urxvt -e "$EDITOR" "$@"
+
!mime ^text, ext xml|html|xhtml|csv|tex|py|pl|rb|sh|php = "$EDITOR" -- "$@"
-!mime ^text, ext xml|html|xhtml|csv|tex|py|pl|rb|sh|php, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@"
-
-#-------------------------------------------
-# Websites
-#-------------------------------------------
-# Rarely installed browsers get higher priority; It is assumed that if you
-# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
-# other hand are often only installed as fallback browsers.
-ext x?html?, has surf, X, flag f = surf -- file://"$1"
-ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
-ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
-ext x?html?, has dwb, X, flag f = dwb -- "$@"
-ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
-ext x?html?, has luakit, X, flag f = luakit -- "$@"
-ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
-ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
-ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
-ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
+!mime ^text, ext xml|html|xhtml|csv|tex|py|pl|rb|sh|php, has urxvt, X, flag f = urxvt -e "$EDITOR" "$@"
+
+# websites
ext x?html?, has firefox, X, flag f = firefox -- "$@"
-ext x?html?, has midori, X, flag f = midori -- "$@"
+ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext x?html?, has elinks, terminal = elinks "$@"
-ext x?html?, has links2, terminal = links2 "$@"
-ext x?html?, has links, terminal = links "$@"
-ext x?html?, has lynx, terminal = lynx -- "$@"
-ext x?html?, has w3m, terminal = w3m "$@"
# wine
ext exe, has wine, X, flag f = wine "$1"
-# music conversion
-directory, has flac2all = "flac2all" "vorbis" "$1" "-v" "quality=10" "-o" "$1/converted"
-directory, has beet = "beet" "imp" "-t" "$1"
-
-name ^[mM]akefile$ = make
-name ^[mM]akefile$ = make clean
-
-#--------------------------------------------
-# Code
-#-------------------------------------------
+# scripts
ext py = python -- "$1"
ext pl = perl -- "$1"
ext rb = ruby -- "$1"
@@ -105,53 +76,34 @@ ext js = node -- "$1"
ext sh = sh -- "$1"
ext php = php -- "$1"
-#--------------------------------------------
-# Audio without X
-#-------------------------------------------
-mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
-ext midi?, terminal, has wildmidi = wildmidi -- "$@"
-
-#--------------------------------------------
-# Video/Audio with a GUI
-#-------------------------------------------
-mime ^video, has mpv, X, flag f = mpv -- "$@"
-mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
+# audio / video
+mime ^audio, terminal, has mpv = mpv --no-video -- "$@"
+mime ^audio, !terminal, has mpv, X, flag f = mpv --force-window=yes -- "$@"
-#--------------------------------------------
-# Video without X:
-#-------------------------------------------
-mime ^video, terminal, !X, has mpv = mpv -- "$@"
+mime ^video, has mpv, X, flag f = mpv -- "$@"
+mime ^video, has mpv, terminal, !X = mpv --vo=tct -- "$@"
+# documents
+ext djvu|pdf|ps, has zathura, X, flag f = zathura -- "$@"
-#-------------------------------------------
-# Documents
-#-------------------------------------------
-ext djvu|pdf|ps, has zathura, X, flag f = zathura -- "$@"
-
-ext tex, has latex = latex "-output-format=pdf" -- "$@"
ext tex, has xelatex = xelatex -- "$@"
+ext tex, has latex = latex "-output-format=pdf" -- "$@"
-ext docx?, has catdoc, terminal = catdoc -- "$@" | $PAGER
+ext docx?, has catdoc, terminal = catdoc -- "$@" | $PAGER
-ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
-ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
ext od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric|rtf, has libreoffice, X, flag f = libreoffice "$@"
+ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
ext sla, has scribus, X, flag f = scribus "$@"
-#-------------------------------------------
-# Images
-#-------------------------------------------
-mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
-mime ^image, has sxiv, X, flag f = sxiv -a "$@"
-mime ^image, has gimp, X, flag f = gimp -- "$@"
-ext xcf, X, flag f = gimp -- "$@"
-ext png, has optipng = optipng -- "$@"
-
-#-------------------------------------------
-# Archives
-#-------------------------------------------
-# This requires atool
+# images
+ext xcf, has gimp, X, flag f = gimp -- "$@"
+mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
+mime ^image, has sxiv, X, flag f = sxiv -a "$@"
+mime ^image, !ext xcf, has gimp, X, flag f = gimp -- "$@"
+mime ^image/png, has optipng = optipng -- "$@"
+
+# archives
ext cbr|cbz, has mcomix, X, flag f = mcomix -- "$@"
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has als = als -- "$@" | $PAGER
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als = als -- "$@" | $PAGER
@@ -161,26 +113,21 @@ ext iso, has udevil = u
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has mcomix, X, flag f = mcomix -- "$@"
ext jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has mcomix, X, flag f = mcomix -- "$@"
-# Fallback:
+directory, has apack = apack "${1}.zip" "$1"
+
ext tar|gz, has tar = tar vvtf "$@" | $PAGER
ext tar|gz, has tar = tar vvxf "$@"
-#-------------------------------------------
-# Calc
-#-------------------------------------------
-ext 8xp|8xk|8xv|8xu, has tilem2, X, flag f = tilem2 "$@"
-ext rom, has tilem2, X, flag f = tilem2 --rom="$1"
-ext 8xp|8xk|8xv|8xu, has tilp = tilp --no-gui "$@"
-
-#-------------------------------------------
-# Roms
-#-------------------------------------------
+# roms
ext nes|gb|gb[ca]|s[wmf]c, has mednafen, X, flag f = mednafen "$1"
-# Define the editor for non-text
-label editor, !mime ^text, !ext xml|csv|tex|py|pl|rb|sh|php = "$EDITOR" -- "$@"
-label editor, !mime ^text, !ext xml|csv|tex|py|pl|rb|sh|php, has urxvt, X, flag f = "urxvt" "-e" "$EDITOR" "$@"
+# makefiles
+name ^[mM]akefile$ = make
+name ^[mM]akefile$ = make new
+name ^[mM]akefile$ = make clean
+name ^[mM]akefile$ = make debug
# Send to server & copy to clipboard
has send, X = send "$@"
+# vim: ft=cfg