summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-08 21:04:55 +0200
committerhut <hut@lavabit.com>2011-10-08 21:04:55 +0200
commitf16004ba6ce2463df6effcda4503d8f6b00ecf90 (patch)
tree8e861bce03b7e794e590014dc33d7cae2c6428fb
parent139f45f23cefc81c5398175d9d562b5280e514bd (diff)
downloadranger-f16004ba6ce2463df6effcda4503d8f6b00ecf90.tar.gz
config_examples: updated doc
-rw-r--r--ranger/data/config_examples/apps.py24
-rwxr-xr-xranger/data/scope.sh5
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.)
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428