This commit is contained in:
2026-08-31 18:46:57 +02:00
parent 21c588f17a
commit 20fcf46c29
34 changed files with 4971 additions and 210 deletions
+69
View File
@@ -0,0 +1,69 @@
import QtQuick
import Quickshell
import qs.Ui
BarWidget {
id: root
moduleName: "local.omarchy-citizen"
readonly property bool opened: panelLoader.item
? panelLoader.item.opened === true
: false
readonly property bool popoutSwitchClosing: panelLoader.item
? panelLoader.item.popoutSwitchClosing === true
: false
function open() {
if (panelLoader.item) panelLoader.item.open()
}
function close() {
if (panelLoader.item) panelLoader.item.close()
}
function toggle() {
if (panelLoader.item) panelLoader.item.toggle()
}
function closeForPopoutSwitch() {
if (panelLoader.item) panelLoader.item.closeForPopoutSwitch()
}
function injectPanel() {
if (!panelLoader.item) return
panelLoader.item.bar = root.bar
panelLoader.item.anchorItem = button
panelLoader.item.hostWidget = root
}
implicitWidth: button.implicitWidth
implicitHeight: button.implicitHeight
onBarChanged: injectPanel()
Loader {
id: panelLoader
active: true
source: Qt.resolvedUrl("Panel.qml")
visible: false
onLoaded: {
root.injectPanel()
Qt.callLater(root.injectPanel)
}
}
WidgetButton {
id: button
anchors.fill: parent
bar: root.bar
text: "✦SC"
tooltipText: "Omarchy Citizen – Plug & Play Star Citizen"
onPressed: function(buttonCode) {
if (buttonCode === Qt.LeftButton) root.toggle()
else if (buttonCode === Qt.RightButton && root.bar)
root.bar.run("xdg-open https://wiki.starcitizen-lug.org")
}
}
}