summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-11-15 21:08:49 +0100
committerhut <hut@lavabit.com>2011-11-15 21:08:49 +0100
commita514859b91df995fb983bbae866653ee7b83e795 (patch)
tree4a759da413153ab80f6cae280a6d95a08986760f
parentbd7d4f042e387250f3c164a2d7e154a5bf3ff602 (diff)
downloadranger-a514859b91df995fb983bbae866653ee7b83e795.tar.gz
defaults/apps.py: Added instructions to overriding app_defaults
-rw-r--r--ranger/defaults/apps.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py
index fcc264f6..01acd551 100644
--- a/ranger/defaults/apps.py
+++ b/ranger/defaults/apps.py
@@ -14,9 +14,17 @@
 # in your ~/.config/ranger/apps.py, you should subclass the class defined
 # here like this:
 #
-# from ranger.defaults.apps import CustomApplications as DefaultApps
-# class CustomApplications(DeafultApps):
-#     <your definitions here>
+#   from ranger.defaults.apps import CustomApplications as DefaultApps
+#   class CustomApplications(DeafultApps):
+#       <your definitions here>
+#
+# To override app_defaults, you can write something like:
+#
+#       def app_defaults(self, c):
+#           f = c.file
+#           if f.extension == 'lol':
+#               return "lolopener", c
+#           return DefaultApps.app_default(self, c)
 #
 # ===================================================================
 # This system is based on things called MODES and FLAGS.  You can read