diff --git a/src/navale_binding.py b/src/navale_binding.py index 0c3e4b7..3bf41b4 100644 --- a/src/navale_binding.py +++ b/src/navale_binding.py @@ -2,6 +2,7 @@ import os from Vasak.system.vsk_icon_manager import VSKIconManager from Vasak.system.vsk_network_manager import VSKNetworkManager +from Vasak.application.vsk_shell_connector import VSKShellConnector from PyQt6.QtCore import pyqtSlot, QObject class NavaleBinding(QObject): @@ -10,6 +11,7 @@ def __init__(self, window): self.window = window self.iconsManager = VSKIconManager() self.networkManager = VSKNetworkManager() + self.shellConnector = VSKShellConnector() @pyqtSlot(str, result=str) def getGlobalIcon(self, iconName): @@ -35,4 +37,8 @@ def getHome(self): @pyqtSlot(str) def toggleWindow(self, id): - self.window.toggleWindow(id) \ No newline at end of file + self.window.toggleWindow(id) + + @pyqtSlot(str) + def exec(self, command): + self.shellConnector.run(command) \ No newline at end of file diff --git a/ui/src/components/button/MenuButton.vue b/ui/src/components/button/MenuButton.vue index 602a133..52a78cf 100755 --- a/ui/src/components/button/MenuButton.vue +++ b/ui/src/components/button/MenuButton.vue @@ -4,7 +4,7 @@ import { ref, onMounted, inject, computed } from 'vue' const $vsk: any = inject('vsk') const menuIcon = ref('') const openMenu = (): void => { - console.log('hydriam') + $vsk.exec('hydriam') } const setIcon = async (): Promise => { menuIcon.value = await $vsk.getGlobalIcon('applications-all')