Update dispatch for new lua config
This commit is contained in:
@@ -19,7 +19,7 @@ Item {
|
|||||||
|
|
||||||
readonly property int workspaceGroup: Math.floor((monitor?.activeWorkspace?.id - 1) / Config.options.bar.workspaces.shown)
|
readonly property int workspaceGroup: Math.floor((monitor?.activeWorkspace?.id - 1) / Config.options.bar.workspaces.shown)
|
||||||
property list<bool> workspaceOccupied: []
|
property list<bool> workspaceOccupied: []
|
||||||
|
|
||||||
property int widgetPadding: 4
|
property int widgetPadding: 4
|
||||||
property int workspaceButtonWidth: 26
|
property int workspaceButtonWidth: 26
|
||||||
property real workspaceIconSizeShrinked: workspaceButtonWidth * 0.55
|
property real workspaceIconSizeShrinked: workspaceButtonWidth * 0.55
|
||||||
@@ -80,7 +80,7 @@ Item {
|
|||||||
bottomLeftRadius: radiusLeft
|
bottomLeftRadius: radiusLeft
|
||||||
topRightRadius: radiusRight
|
topRightRadius: radiusRight
|
||||||
bottomRightRadius: radiusRight
|
bottomRightRadius: radiusRight
|
||||||
|
|
||||||
color: ColorUtils.transparentize(Appearance.m3colors.m3secondaryContainer, 0.4)
|
color: ColorUtils.transparentize(Appearance.m3colors.m3secondaryContainer, 0.4)
|
||||||
opacity: (root.workspaceOccupied[index] || root.isMonitorWorkspace(index+1)) ? 1 : 0
|
opacity: (root.workspaceOccupied[index] || root.isMonitorWorkspace(index+1)) ? 1 : 0
|
||||||
|
|
||||||
@@ -148,9 +148,9 @@ Item {
|
|||||||
id: button
|
id: button
|
||||||
property int workspaceValue: workspaceGroup * Config.options.bar.workspaces.shown + index + 1
|
property int workspaceValue: workspaceGroup * Config.options.bar.workspaces.shown + index + 1
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
onPressed: Hyprland.dispatch(`workspace ${workspaceValue}`)
|
onPressed: Hyprland.dispatch(`hl.dsp.focus({ workspace = "${workspaceValue}" })`)
|
||||||
width: root.workspaceButtonWidth
|
width: root.workspaceButtonWidth
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
id: workspaceButtonBackground
|
id: workspaceButtonBackground
|
||||||
implicitWidth: root.workspaceButtonWidth
|
implicitWidth: root.workspaceButtonWidth
|
||||||
@@ -166,7 +166,7 @@ Item {
|
|||||||
font.pixelSize: Appearance.font.pixelSize.small - ((text.length - 1) * (text !== "10") * 2)
|
font.pixelSize: Appearance.font.pixelSize.small - ((text.length - 1) * (text !== "10") * 2)
|
||||||
text: `${button.workspaceValue}`
|
text: `${button.workspaceValue}`
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
color: (monitor?.activeWorkspace?.id == button.workspaceValue) ?
|
color: (monitor?.activeWorkspace?.id == button.workspaceValue) ?
|
||||||
Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1Inactive
|
Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1Inactive
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
@@ -177,4 +177,4 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user