started on workspaces
This commit is contained in:
10
Bar.qml
10
Bar.qml
@@ -57,7 +57,12 @@ Scope {
|
|||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
left: parent.left
|
||||||
|
leftMargin: 7
|
||||||
|
}
|
||||||
|
|
||||||
|
Left {
|
||||||
|
monitor: win.monitor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +86,8 @@ Scope {
|
|||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
right: parent.right
|
||||||
|
rightMargin: 7
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,8 +112,6 @@ Item {
|
|||||||
model: root.server.trackedNotifications.values.length
|
model: root.server.trackedNotifications.values.length
|
||||||
spacing: 7
|
spacing: 7
|
||||||
|
|
||||||
// verticalLayoutDirection: ListView.BottomToTop
|
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
id: notifRoot
|
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 {
|
TapHandler {
|
||||||
onTapped: {
|
onTapped: {
|
||||||
notifRoot.currentNotif.dismiss();
|
notifRoot.currentNotif.dismiss();
|
||||||
|
|||||||
24
Bar/Left.qml
Normal file
24
Bar/Left.qml
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,6 +21,7 @@ Singleton {
|
|||||||
NotificationServer {
|
NotificationServer {
|
||||||
id: server
|
id: server
|
||||||
|
|
||||||
|
actionsSupported: true
|
||||||
bodyMarkupSupported: true
|
bodyMarkupSupported: true
|
||||||
bodySupported: true
|
bodySupported: true
|
||||||
|
|
||||||
|
|||||||
22
Services/WorkspaceManager.qml
Normal file
22
Services/WorkspaceManager.qml
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
module Services
|
module Services
|
||||||
singleton Time 1.0 Time.qml
|
singleton Time 1.0 Time.qml
|
||||||
singleton NotificationManager 1.0 NotificationManager.qml
|
singleton NotificationManager 1.0 NotificationManager.qml
|
||||||
|
singleton WorkspaceManager 1.0 WorkspaceManager.qml
|
||||||
|
|||||||
11
devenv.nix
11
devenv.nix
@@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
# https://devenv.sh/packages/
|
env.DEVSHELL_NAME = " devenv/#fab387| quickshell/green";
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
quickshell
|
quickshell
|
||||||
kdePackages.qtdeclarative
|
kdePackages.qtdeclarative
|
||||||
];
|
];
|
||||||
env.DEVSHELL_NAME = " devenv/#fab387| quickshell/green";
|
|
||||||
|
processes = {
|
||||||
|
qs.exec = "quickshell -p .";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user