diff --git a/Bar.qml b/Bar.qml index 1cf02eb..a951fdf 100644 --- a/Bar.qml +++ b/Bar.qml @@ -103,7 +103,7 @@ Scope { Layout.alignment: Qt.AlignVCenter text: "\ue7f4" font.family: "Material Symbols Rounded" - font.pixelSize: 22 + font.pixelSize: 20 color: "white" MouseArea { anchors.fill: parent diff --git a/Modules/oldsway.qml b/Modules/oldsway.qml deleted file mode 100644 index dfb2773..0000000 --- a/Modules/oldsway.qml +++ /dev/null @@ -1,94 +0,0 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import Quickshell -import Quickshell.Io - -Item { - id: root - implicitWidth: notificationButton.implicitWidth - implicitHeight: notificationButton.implicitHeight - - property var notificationState: ({}) - - function updateState(output) { - try { - notificationState = JSON.parse(output.trim()) - } catch (e) { - console.error("Failed to parse swaync state:", e) - } - } - - function getIcon() { - let count = notificationState["text"] || 0 - let hasNotification = count > 0 - if (hasNotification) return "notification" - return "none" - } - - function getDisplayText() { - let icon = getIcon() - let count = notificationState["count"] || 0 - - if (icon.includes("notification")) { - return "" - } - return "" - } - - Process { - id: swayNcMonitor - running: true - command: ["swaync-client", "-swb"] - - stdout: SplitParser { - onRead: data => root.updateState(data) - } - } - - Process { - id: swayncProcess - command: ["sh", "-c", "qs -p /home/zach/GitProjects/z-bar-qt/notification-test/shell.qml ipc call root showCenter"] - running: false - } - - Button { - id: notificationButton - flat: true - - background: Rectangle { - color: "transparent" - radius: 4 - } - - contentItem: RowLayout { - spacing: 0 - - Text { - text: root.getDisplayText() - color: "white" - font.pixelSize: 16 - Layout.alignment: Qt.AlignVCenter - } - - Text { - text: "●" - color: "red" - font.pixelSize: 6 - visible: root.getIcon().includes("notification") - Layout.alignment: Qt.AlignTop | Qt.AlignRight - Layout.topMargin: 0 - Layout.rightMargin: 4 - } - } - - MouseArea { - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - onClicked: { - swayncProcess.running = true - } - } - } -}