diff --git a/plasmoid/contents/code/pkgstartservice.sh b/plasmoid/contents/code/pkgstartservice.sh --- a/plasmoid/contents/code/pkgstartservice.sh +++ b/plasmoid/contents/code/pkgstartservice.sh @@ -1,6 +1,4 @@ #!/bin/bash - -service mycroft-messagebus start -service mycroft-skills start -service mycroft-speech-client start +systemctl --user daemon-reload +systemctl --user start mycroft.target paplay /usr/share/sounds/freedesktop/stereo/dialog-error.oga diff --git a/plasmoid/contents/code/pkgstopservice.sh b/plasmoid/contents/code/pkgstopservice.sh --- a/plasmoid/contents/code/pkgstopservice.sh +++ b/plasmoid/contents/code/pkgstopservice.sh @@ -1,6 +1,4 @@ #!/bin/bash -service mycroft-messagebus stop -service mycroft-skills stop -service mycroft-speech-client stop +systemctl --user stop mycroft.target paplay /usr/share/sounds/freedesktop/stereo/dialog-error.oga diff --git a/plasmoid/contents/images/mrightsmallanim.png b/plasmoid/contents/images/mrightsmallanim.png new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@Mycroft is disabled") font.bold: false; font.pixelSize: 14 - color: "#fff" + color: theme.textColor + } + + PlasmaComponents.Button { + id: statusRetryBtn + anchors.top: parent.top + anchors.topMargin: 1 + anchors.left: statusId.right + anchors.leftMargin: units.gridUnit * 0.50 + anchors.bottom: parent.bottom + anchors.bottomMargin: units.gridUnit * 0.25 + text: i18n("Reconnect") + width: units.gridUnit * 6 + visible: false + + onClicked: { + retryConn() + } } TopBarAnim { @@ -563,6 +597,7 @@ onClicked: { if (mycroftstartservicebutton.checked === false) { + statusRetryBtn.visible = false PlasmaLa.LaunchApp.runCommand("bash", coreinstallstoppath); convoLmodel.clear() suggst.visible = true; @@ -578,6 +613,9 @@ convoLmodel.clear() } suggst.visible = true; + statusId.color = theme.linkColor + statusId.text = i18n("Starting up..please wait") + statusId.visible = true delay(15000, function() { socket.active = true; }) @@ -653,19 +691,18 @@ active: true onStatusChanged: if (mycroftStatusCheckSocket.status == WebSocket.Open && socket.status == WebSocket.Closed) { - console.log("Activated") socket.active = true disclaimbox.visible = false; mycroftstartservicebutton.checked = true - statusId.text = i18n("Mycroft is Ready") + statusId.text = i18n("Mycroft is ready") statusId.color = "green" statusId.visible = true } else if (mycroftStatusCheckSocket.status == WebSocket.Error) { mycroftstartservicebutton.checked = false - statusId.text = i18n("Mycroft is Disabled") - statusId.color = "#f4bf42" + statusId.text = i18n("Mycroft is disabled") + statusId.color = theme.textColor statusId.visible = true } } @@ -729,19 +766,21 @@ } onStatusChanged: if (socket.status == WebSocket.Error) { - statusId.text = "Connection Error" + statusId.text = i18n("Connection error") statusId.color = "red" mycroftstartservicebutton.circolour = "red" midbarAnim.showstatsId() + statusRetryBtn.visible = true drawer.open() waitanimoutter.aniRunError() delay(1250, function() { drawer.close() }) } else if (socket.status == WebSocket.Open) { - statusId.text = "Mycroft is Ready" + statusId.text = i18n("Mycroft is ready") statusId.color = "green" + statusRetryBtn.visible = false mycroftstartservicebutton.circolour = "green" mycroftStatusCheckSocket.active = false; midbarAnim.showstatsId() @@ -751,18 +790,18 @@ drawer.close() }) } else if (socket.status == WebSocket.Closed) { - statusId.text = "Mycroft is Disabled" - statusId.color = "#f4bf42" + statusId.text = i18n("Mycroft is disabled") + statusId.color = theme.textColor mycroftstartservicebutton.circolour = Qt.lighter(theme.backgroundColor, 1.5) midbarAnim.showstatsId() } else if (socket.status == WebSocket.Connecting) { - statusId.text = "Starting Up" - statusId.color = "grey" + statusId.text = i18n("Starting up..please wait") + statusId.color = theme.linkColor mycroftstartservicebutton.circolour = "steelblue" midbarAnim.showstatsId() } else if (socket.status == WebSocket.Closing) { - statusId.text = "Shutting Down" - statusId.color = "grey" + statusId.text = i18n("Shutting down") + statusId.color = theme.textColor midbarAnim.showstatsId() } } @@ -1061,7 +1100,7 @@ checked: true onCheckedChanged: { - + locationUserSelected = true if (settingsTabUnitsOpZero.checked === true && coreinstallstartpath === packagemcorestartcmd) { coreinstallstartpath = defaultmcorestartpath; } @@ -1111,7 +1150,7 @@ checked: false onCheckedChanged: { - + locationUserSelected = true if (settingsTabUnitsOpTwo.checked === true && coreinstallstartpath === defaultmcorestartpath) { coreinstallstartpath = customlocstartpath; } @@ -1475,7 +1514,7 @@ Drawer { id: drawer - width: parent.width + width: dwrpaddedwidth height: units.gridUnit * 5.5 edge: Qt.BottomEdge @@ -1517,12 +1556,12 @@ anchors.bottom: parent.bottom anchors.left: parent.left - PlasmaComponents.ToolButton { + PlasmaCore.IconItem { id: keybdImg - iconSource: "input-keyboard" + source: "input-keyboard" anchors.centerIn: parent - width: units.gridUnit * 2 - height: units.gridUnit * 2 + width: units.gridUnit * 1.5 + height: units.gridUnit * 1.5 } Rectangle { @@ -1590,10 +1629,10 @@ AutocompleteBox { id: suggestionsBox model: completionItems - width: qinput.width + width: parent.width anchors.bottom: qinput.top - anchors.left: qinput.left - anchors.right: qinput.right + anchors.left: parent.left + anchors.right: parent.right filter: textInput.text property: "name" onItemSelected: complete(item)