diff --git a/Bar.qml b/Bar.qml index 35afe91..21dbcfc 100644 --- a/Bar.qml +++ b/Bar.qml @@ -57,7 +57,12 @@ Scope { height: childrenRect.height anchors { - right: parent.right + left: parent.left + leftMargin: 7 + } + + Left { + monitor: win.monitor } } @@ -81,7 +86,8 @@ Scope { height: childrenRect.height anchors { - left: parent.left + right: parent.right + rightMargin: 7 } } } diff --git a/Bar/Center/NotificationList.qml b/Bar/Center/NotificationList.qml index d4648c1..c6372c9 100644 --- a/Bar/Center/NotificationList.qml +++ b/Bar/Center/NotificationList.qml @@ -112,8 +112,6 @@ Item { model: root.server.trackedNotifications.values.length spacing: 7 - // verticalLayoutDirection: ListView.BottomToTop - delegate: Item { id: notifRoot @@ -169,6 +167,19 @@ Item { } ] + StyledText { + color: Colors.surface0 + font.pointSize: 15 + horizontalAlignment: Qt.AlignRight + text: "󰩹" + verticalAlignment: Qt.AlignVCenter + + anchors { + fill: parent + rightMargin: 14 + } + } + TapHandler { onTapped: { notifRoot.currentNotif.dismiss(); diff --git a/Bar/Left.qml b/Bar/Left.qml new file mode 100644 index 0000000..ba4ab81 --- /dev/null +++ b/Bar/Left.qml @@ -0,0 +1,24 @@ +pragma ComponentBehavior: Bound +import QtQuick +import QtQuick.Layouts +import Quickshell +import Quickshell.Hyprland +import Quickshell.Services.Notifications +import "../Color.js" as Colors +import "../Components/" +import "../Services/" +import "./Center" + +Container { + required property HyprlandMonitor monitor + + boxHeight: 25 + boxWidth: 40 + exclusiveMonitor: monitor + + Item { + StyledText { + text: WorkspaceManager.getWorkspacesForMonitor(monitor) + } + } +} diff --git a/Services/NotificationManager.qml b/Services/NotificationManager.qml index ece9287..02981e3 100644 --- a/Services/NotificationManager.qml +++ b/Services/NotificationManager.qml @@ -21,6 +21,7 @@ Singleton { NotificationServer { id: server + actionsSupported: true bodyMarkupSupported: true bodySupported: true diff --git a/Services/WorkspaceManager.qml b/Services/WorkspaceManager.qml new file mode 100644 index 0000000..0bd91e2 --- /dev/null +++ b/Services/WorkspaceManager.qml @@ -0,0 +1,22 @@ +pragma Singleton +import QtQuick +import Quickshell +import Quickshell.Hyprland + +Singleton { + id: root + + function getWorkspacesForMonitor(monitor) { + let allWorkspaces = Hyprland.workspaces; + let monitorWorkspaces = []; + for (let workspace in allWorkspaces) { + let currentWorkspace = allWorkspaces[workspace]; + + if (currentWorkspace.monitor == monitor) { + console.log("correct"); + } else { + console.log("incorrect"); + } + } + } +} diff --git a/Services/qmldir b/Services/qmldir index ad604ed..586fa0f 100644 --- a/Services/qmldir +++ b/Services/qmldir @@ -1,3 +1,4 @@ module Services singleton Time 1.0 Time.qml singleton NotificationManager 1.0 NotificationManager.qml +singleton WorkspaceManager 1.0 WorkspaceManager.qml diff --git a/devenv.nix b/devenv.nix index 4e65aa1..c0112ee 100644 --- a/devenv.nix +++ b/devenv.nix @@ -1,16 +1,17 @@ { pkgs, - lib, - config, - inputs, ... }: { - # https://devenv.sh/packages/ + env.DEVSHELL_NAME = "󰏖 devenv/#fab387| quickshell/green"; + packages = with pkgs; [ quickshell kdePackages.qtdeclarative ]; - env.DEVSHELL_NAME = "󰏖 devenv/#fab387| quickshell/green"; + + processes = { + qs.exec = "quickshell -p ."; + }; }