diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 00:56:55 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 00:56:55 +1000 |
| commit | d54df2792ad8536ea2e4135fba3bb3558e281fe1 (patch) | |
| tree | 22445e7f85a5c4e9e84a337f4676c97e4550905e /modules/bar/components/workspaces/Workspace.qml | |
| parent | dev: fix run script (diff) | |
| download | caelestia-shell-d54df2792ad8536ea2e4135fba3bb3558e281fe1.tar.gz caelestia-shell-d54df2792ad8536ea2e4135fba3bb3558e281fe1.tar.bz2 caelestia-shell-d54df2792ad8536ea2e4135fba3bb3558e281fe1.zip | |
feat: bar panel preset
Make presets more flexible
Fix workspaces when show windows disabled
Make rounded option for workspaces
Diffstat (limited to 'modules/bar/components/workspaces/Workspace.qml')
| -rw-r--r-- | modules/bar/components/workspaces/Workspace.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml index 2e30169..bd28f7a 100644 --- a/modules/bar/components/workspaces/Workspace.qml +++ b/modules/bar/components/workspaces/Workspace.qml @@ -16,13 +16,14 @@ Item { readonly property bool isWorkspace: true // Flag for finding workspace children // Unanimated prop for others to use as reference - readonly property real size: childrenRect[vertical ? "height" : "width"] + (isOccupied ? Appearance.padding.normal : 0) + readonly property real size: childrenRect[vertical ? "height" : "width"] + (shouldPad ? Appearance.padding.normal : 0) readonly property int ws: groupOffset + index + 1 readonly property bool isOccupied: occupied[ws] ?? false + readonly property bool shouldPad: isOccupied && BarConfig.workspaces.showWindows - Layout.preferredWidth: childrenRect.width + (isOccupied && !vertical ? Appearance.padding.normal : 0) - Layout.preferredHeight: childrenRect.height + (isOccupied && vertical ? Appearance.padding.normal : 0) + Layout.preferredWidth: childrenRect.width + (shouldPad && !vertical ? Appearance.padding.normal : 0) + Layout.preferredHeight: childrenRect.height + (shouldPad && vertical ? Appearance.padding.normal : 0) StyledText { id: indicator @@ -49,7 +50,7 @@ Item { Repeater { model: ScriptModel { - values: Hyprland.clients.filter(c => c.workspace?.id === root.ws) + values: BarConfig.workspaces.showWindows ? Hyprland.clients.filter(c => c.workspace?.id === root.ws) : [] } MaterialIcon { |