aboutsummaryrefslogtreecommitdiffstats
path: root/examples/launchers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--examples/launchers15
1 files changed, 12 insertions, 3 deletions
diff --git a/examples/launchers b/examples/launchers
index fdb358a..86bd54f 100644
--- a/examples/launchers
+++ b/examples/launchers
@@ -24,6 +24,8 @@ import sys
import time
from plugins.image import Image
+from plugins.application import Application
+
OUTPUT, HEIGHT, YPOS, TOP = 0, 24, 24, True
@@ -65,14 +67,21 @@ class LauncherSet:
bar.invalidate()
+def desktop(file):
+ application = Application(file)
+ icon = application.get_setting('Icon')
+ command = Application.strip_placeholders(application.get_setting('Exec'))
+ return (icon, 'sh', '-c', command)
+
+
launchers = [ [ ('accessories-calculator', 'mate-calc')
, ('accessories-character-map', 'mucharmap')
, ('scanner', 'simple-scan')
, ('meld', 'meld')
]
, [ ('dia', 'dia')
- , ('inkscape', 'inkscape')
- , ('gimp', 'gimp')
+ , desktop ('inkscape')
+ , desktop ('gimp')
, ('calligrakrita', 'krita')
, ('blender', 'blender')
, ('/usr/share/pixmaps/openscad.png', 'openscad')
@@ -139,5 +148,5 @@ def unhandled_event(e):
elif button == SCROLL_DOWN: launchers[x].scroll_down()
-# TODO support for droping files onto the launchers to open with those files would be nice
+# TODO support for dropping files onto the launchers to open with those files would be nice