mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 17:52:10 -04:00
more uwsm hacks
This commit is contained in:
@@ -9,6 +9,7 @@ import qs.Common
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property bool hasUwsm: false
|
||||||
property bool isElogind: false
|
property bool isElogind: false
|
||||||
property bool inhibitorAvailable: true
|
property bool inhibitorAvailable: true
|
||||||
property bool idleInhibited: false
|
property bool idleInhibited: false
|
||||||
@@ -18,6 +19,16 @@ Singleton {
|
|||||||
detectElogindProcess.running = true
|
detectElogindProcess.running = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: detectUwsmProcess
|
||||||
|
running: false
|
||||||
|
command: ["which", "uwsm"]
|
||||||
|
|
||||||
|
onExited: function (exitCode) {
|
||||||
|
hasUwsm = (exitCode === 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: detectElogindProcess
|
id: detectElogindProcess
|
||||||
running: false
|
running: false
|
||||||
@@ -57,7 +68,9 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
uwsmLogout.running = true
|
if (hasUwsm)
|
||||||
|
uwsmLogout.running = true
|
||||||
|
_logout()
|
||||||
}
|
}
|
||||||
|
|
||||||
function _logout() {
|
function _logout() {
|
||||||
|
|||||||
Reference in New Issue
Block a user