mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
mpris stuff
This commit is contained in:
parent
233e12e094
commit
f0673a66a2
10 changed files with 192 additions and 104 deletions
|
|
@ -8,15 +8,15 @@ RowLayout {
|
|||
spacing: 6
|
||||
visible: Hyprland.monitors.values.length != 0
|
||||
|
||||
required property var screen
|
||||
required property var screen
|
||||
|
||||
Repeater {
|
||||
id: workspaceButtons
|
||||
|
||||
model: ScriptModel {
|
||||
values: Hyprland.workspaces.values.slice().filter(
|
||||
workspace => workspace.monitor === Hyprland.monitorFor(screen)
|
||||
).sort((a,b) => {
|
||||
return a.id - b.id;
|
||||
});
|
||||
)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -26,7 +26,7 @@ RowLayout {
|
|||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredHeight: 12
|
||||
Layout.preferredWidth: {
|
||||
if (Hyprland.focusedMonitor.activeWorkspace.id == modelData.id)
|
||||
if (Hyprland.focusedMonitor?.activeWorkspace?.id === modelData?.id)
|
||||
return 25;
|
||||
|
||||
return 12;
|
||||
|
|
@ -40,7 +40,7 @@ RowLayout {
|
|||
|
||||
if (workspaceButton.containsMouse) {
|
||||
value = ShellSettings.colors["on_primary"];
|
||||
} else if (Hyprland.focusedMonitor.activeWorkspace.id == modelData.id) {
|
||||
} else if (Hyprland.focusedMonitor.activeWorkspace.id === modelData.id) {
|
||||
value = ShellSettings.colors["primary"];
|
||||
}
|
||||
|
||||
|
|
@ -55,6 +55,13 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 100
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: workspaceButton
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue