about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-10-16 18:48:09 +0200
committertoonn <toonn@toonn.io>2019-10-16 18:48:09 +0200
commit69c816ee485c0ca5f2f651ae6f208f8e4e6a7c20 (patch)
treec3edb0e3fa8af17e97161137b52ad32f4a8d7ccf /ranger
parent50a82e08e41bb336b0f3388cda5c75ad79d9c99c (diff)
downloadranger-69c816ee485c0ca5f2f651ae6f208f8e4e6a7c20.tar.gz
Add generic openers for linux and mac
Rifle serves a similar purpose to `xdg-open` on Linux and `open` on
macOS. We fall back to those so users can enjoy their xdg and other
configuration from rifle.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/config/rifle.conf6
1 files changed, 6 insertions, 0 deletions
diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf
index 8c48760e..86f53fd1 100644
--- a/ranger/config/rifle.conf
+++ b/ranger/config/rifle.conf
@@ -259,6 +259,12 @@ label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
 label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
 label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
 
+#-------------------------------------------
+# Generic file openers
+#-------------------------------------------
+label open, has xdg-open = xdg-open -- "$@"
+label open, has open     = open -- "$@"
+
 # Define the editor for non-text files + pager as last action
               !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = ask
 label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php  = ${VISUAL:-$EDITOR} -- "$@"