]> ToastFreeware Gitweb - gregoa/zavai.git/blobdiff - src/app_keyboard.vala
Use find_and_run_script more thoroughly
[gregoa/zavai.git] / src / app_keyboard.vala
index 467c1f631314e61bce3ebc58eab5459251c6251a..18efc2b70f47b8ea72b0616bfec5a8819f0e9ef9 100644 (file)
@@ -42,7 +42,10 @@ public class Keyboard : Service
 
     protected override void start()
     {
-        string[] args = { zavai.config.homedir + "/keyboard", null };
+        string script = zavai.config.find_script("keyboard");
+        if (script == null) return;
+
+        string[] args = { script, null };
         int opid;
         try {
             Gdk.spawn_on_screen(
@@ -153,11 +156,12 @@ KeyboardIcon icon;
 
 public void init()
 {
-stderr.printf("INIT KBD\n");
-    keyboard = new Keyboard();
-    zavai.registry.register_service(keyboard);
-    icon = new KeyboardIcon();
-    icon.set_visible(true);
+    if (zavai.config.profile != "laptop")
+    {
+        keyboard = new Keyboard();
+        icon = new KeyboardIcon();
+        icon.set_visible(true);
+    }
 }
 
 }