started on workspaces

This commit is contained in:
2026-06-23 13:21:29 +01:00
parent 10ff3c170e
commit 175cea641b
7 changed files with 75 additions and 9 deletions

10
Bar.qml
View File

@@ -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
}
}
}

View File

@@ -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();

24
Bar/Left.qml Normal file
View File

@@ -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)
}
}
}

View File

@@ -21,6 +21,7 @@ Singleton {
NotificationServer {
id: server
actionsSupported: true
bodyMarkupSupported: true
bodySupported: true

View File

@@ -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");
}
}
}
}

View File

@@ -1,3 +1,4 @@
module Services
singleton Time 1.0 Time.qml
singleton NotificationManager 1.0 NotificationManager.qml
singleton WorkspaceManager 1.0 WorkspaceManager.qml

View File

@@ -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 .";
};
}