From 20a31620945503dedfd0a3f6a93a4389e7cfffcc Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 8 Oct 2011 19:34:02 +0200 Subject: defaults/apps: Removed example code, its now in config_examples/ --- ranger/defaults/apps.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py index 2579f882..4f90c807 100644 --- a/ranger/defaults/apps.py +++ b/ranger/defaults/apps.py @@ -16,34 +16,6 @@ """ This is the default ranger configuration file for filetype detection and application handling. - -You can place this file in your ~/.config/ranger/ directory and it will be used -instead of this one. Though, to minimize your effort when upgrading ranger, -you may want to subclass CustomApplications rather than making a full copy. - -This example modifies the behaviour of "feh" and adds a custom media player: - -#### start of the ~/.config/ranger/apps.py example - from ranger.defaults.apps import CustomApplications as DefaultApps - from ranger.api.apps import * - - class CustomApplications(DefaultApps): - def app_kaffeine(self, context): - return 'kaffeine', context - - def app_feh_fullscreen_by_default(self, context): - return 'feh', '-F', context - - def app_default(self, context): - f = context.file #shortcut - if f.video or f.audio: - return self.app_kaffeine(context) - - if f.image and context.mode == 0: - return self.app_feh_fullscreen_by_default(context) - - return DefaultApps.app_default(self, context) -#### end of the example """ import ranger -- cgit 1.4.1-2-gfad0