mirror of
https://github.com/bgrolleman/dotfiles.git
synced 2026-11-08 15:50:29 +01:00
Add my noctalia setup config
This commit is contained in:
1 parent
c9a260c319
commit
d874988a3e
29 files changed
+1397
-1
No files matched your search
@@ -0,0 +1,50 @@
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Effects
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.Polkit
|
||||
import Quickshell.Wayland
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
import qs.Services.UI
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property var pluginApi: null
|
||||
|
||||
PolkitAgent {
|
||||
id: agent
|
||||
|
||||
onIsActiveChanged: {
|
||||
if (isActive) {
|
||||
openWindow()
|
||||
} else {
|
||||
closeWindow()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property var window: null
|
||||
|
||||
function openWindow() {
|
||||
if (window === null) {
|
||||
window = Qt.createComponent("PolkitWindow.qml").createObject(root, {
|
||||
flow: agent.flow,
|
||||
pluginApi: Qt.binding(function() { return root.pluginApi })
|
||||
});
|
||||
window.visible = true;
|
||||
} else {
|
||||
window.flow = agent.flow
|
||||
window.pluginApi = root.pluginApi
|
||||
window.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
function closeWindow() {
|
||||
if (window !== null) {
|
||||
window.destroy();
|
||||
window = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user