diff --git a/Workspaces.qml b/Workspaces.qml index fbe7000..b9e5343 100644 --- a/Workspaces.qml +++ b/Workspaces.qml @@ -99,8 +99,8 @@ BarWidget { // added on each side of a group divider. The divider sits in the same // GridLayout as the buttons, so without this it would inherit the ordinary // inter-button spacing and the three groups would read as one run. - readonly property real itemSpacing: Style.space(1) - readonly property real groupGap: itemSpacing * 4 + readonly property real itemSpacing: 0 + readonly property real groupGap: Style.space(5) implicitWidth: grid.implicitWidth + trailingGap implicitHeight: grid.implicitHeight @@ -149,14 +149,22 @@ BarWidget { readonly property bool focused: Hyprland.focusedWorkspace !== null && Hyprland.focusedWorkspace.id === wsId bar: root.bar - // Stock rendered 10 as "0" to keep every label one character. With - // 11-20 alongside it, two-digit labels are the norm, so 10 is shown - // as itself. - text: focused ? "󱓻" : String(wsId) + // Single digit per workspace: id mod 10, so 11-15 read "1 2 3 4 5", + // 1-10 read "1 2 3 4 5 6 7 8 9 0", and 16-20 read "6 7 8 9 0". + // + // That is not just for width — it makes the label the key you press. + // The bindings in ~/.config/hypr/bindings.lua are SUPER+ for 1-10, + // SUPER+CTRL+1..5 for 11-15 and SUPER+CTRL+6..0 for 16-20, so the + // digit shown is the digit in the shortcut for that workspace. + text: focused ? "󱓻" : String(wsId % 10) opacity: occupied || focused ? 1 : 0.5 horizontalMargin: 6 verticalPadding: 6 - fixedWidth: root.vertical ? root.barSize : Style.space(22) + // Twenty workspaces plus dividers is a lot of bar. Every label is a + // single character now, so these can be narrower still than the + // stock space(20), with a font a step below body. + fontSize: Style.font.bodySmall + fixedWidth: root.vertical ? root.barSize : Style.space(13) fixedHeight: root.barSize onPressed: function() { root.focusWorkspace(wsId) } }