From c3cdeb9cbb3a4718d8b0d707e0864c00aca7a580 Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 23 Jan 2010 14:17:16 +0100 Subject: apps: added handler for common webbrowsers --- ranger/defaults/apps.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py index 49233ce3..10c522fe 100644 --- a/ranger/defaults/apps.py +++ b/ranger/defaults/apps.py @@ -29,6 +29,8 @@ class CustomApplications(Applications): if f.extension is not None: if f.extension in ('pdf'): return self.either(c, 'apvlv', 'evince') + if f.extension in ('html', 'htm', 'xhtml', 'swf'): + return self.either(c, 'firefox', 'opera', 'elinks') if f.extension in ('swc', 'smc'): return self.app_zsnes(c) @@ -125,9 +127,17 @@ class CustomApplications(Applications): if c.mode is 2: return tup("make", "clear") + @depends_on('elinks') + def app_elinks(self, c): + return tup('elinks', *c) + + @depends_on('opera') + def app_elinks(self, c): + return tup('opera', *c) + @depends_on('firefox') def app_firefox(self, c): - return tup("firefox") + return tup("firefox", *c) @depends_on('javac') def app_javac(self, c): -- cgit 1.4.1-2-gfad0