diff options
-rw-r--r-- | ranger/data/config_examples/apps.py | 24 | ||||
-rwxr-xr-x | ranger/data/scope.sh | 5 |
2 files changed, 16 insertions, 13 deletions
diff --git a/ranger/data/config_examples/apps.py b/ranger/data/config_examples/apps.py index 36415e77..8edb6583 100644 --- a/ranger/data/config_examples/apps.py +++ b/ranger/data/config_examples/apps.py @@ -1,5 +1,5 @@ # =================================================================== -# This is the configuration file for filetype detection and application +# This is the configuration file for file type detection and application # handling. It's all in python; lines beginning with # are comments. # # Scroll down for a few examples. @@ -13,16 +13,16 @@ # w Wait for an Enter-press when the process is done # c Run the current file only, instead of the selection # +# To implement flags in this file, you could do this: +# context.flags += "d" +# Another example: +# context.flags += "Dw" +# # To implement modes in this file, you can do something like: # if context.mode == 1: # <run in one way> # elif context.mode == 2: # <run in another way> -# -# To implement flags in this file, you could do this: -# context.flags += "d" -# Another example: -# context.flags += "Dw" # =================================================================== # The methods are called with a "context" object which provides some # attributes that transfer information. Relevant attributes are: @@ -45,10 +45,11 @@ # # 3. A tuple of arguments that should be run. # return "mplayer", "-fs", context.file.path -# Since the tuple is flattened later, you can even put lists of files here: -# return "mplayer", "-fs", "-shuf", context.filepaths -# This can, and will often be abbreviated with: -# return "mplayer", "-fs", "-shuf", context +# If you use lists instead of strings, they will be flattened: +# args = ["-fs", "-shuf"] +# return "mplayer", args, context.filepaths +# "context.filepaths" can, and will often be abbreviated with just "context": +# return "mplayer", context # =================================================================== # Import the basics @@ -61,7 +62,8 @@ from ranger.api.apps import * # contains a whole lot of definitions. The reason why we don't put them here # is that when you update, this file doesn't change. class CustomApplications(DefaultApps): - pass # By default, we do nothing. + # By default, this just inherits all methods from DefaultApps + pass # def app_kaffeine(self, context): # return 'kaffeine', context diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index ca1f7e67..aeb47a13 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -1,6 +1,7 @@ #!/bin/bash -# This script is called whenever you preview a file. -# Its output is used as the preview. ANSI color codes are supported. +# ranger supports enhanced previews. If the option "use_preview_script" +# is set to True (by default it's False), this script will be called +# and its output is displayed in ranger. ANSI color codes are supported. # NOTES: This script is considered a configuration file. If you upgrade # ranger, it will be left untouched. (You must update it yourself.) |