mirror of
https://github.com/JuanCanham/skill-desktop-launcher.git
synced 2024-11-22 08:50:11 +00:00
commit
ee7dd2bb03
@ -74,7 +74,7 @@ class DesktopLauncherSkill(MycroftSkill):
|
|||||||
"LaunchDesktopApplicationIntent").require("LaunchKeyword").require(
|
"LaunchDesktopApplicationIntent").require("LaunchKeyword").require(
|
||||||
"Application").build()
|
"Application").build()
|
||||||
self.register_intent(launch_intent, self.handle_launch_desktop_app)
|
self.register_intent(launch_intent, self.handle_launch_desktop_app)
|
||||||
|
|
||||||
close_intent = IntentBuilder(
|
close_intent = IntentBuilder(
|
||||||
"CloseDesktopApplicationIntent").require("CloseKeyword").require(
|
"CloseDesktopApplicationIntent").require("CloseKeyword").require(
|
||||||
"Application").build()
|
"Application").build()
|
||||||
@ -95,10 +95,10 @@ class DesktopLauncherSkill(MycroftSkill):
|
|||||||
apps = self.appmap.get(app_name)
|
apps = self.appmap.get(app_name)
|
||||||
if apps and len(apps) > 0:
|
if apps and len(apps) > 0:
|
||||||
apps[0].launch()
|
apps[0].launch()
|
||||||
|
|
||||||
def handle_close_desktop_app(self, message):
|
def handle_close_desktop_app(self, message):
|
||||||
app_name = message.data.get('Application')
|
app_name = message.data.get('Application')
|
||||||
subprocess.call( [ "killall", "-9", app_name ] )
|
subprocess.call( [ "killall", "-9", app_name ] )
|
||||||
|
|
||||||
def handle_launch_website(self, message):
|
def handle_launch_website(self, message):
|
||||||
site = message.data.get("Website")
|
site = message.data.get("Website")
|
||||||
|
Loading…
Reference in New Issue
Block a user