repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(nuguland): stack idx over abbreviated name in vertical workspace pills

919a3deee0400fe89390a92c9b3c15b2ac15ff38

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Vertical pills showed the index only. Now stack the centered index over
an abbreviated workspace name (e.g. 1 / cod), matching the abbreviated
widget labels. Horizontal keeps the inline "idx name" form.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Changed files (1)

quickshell/nuguland/Bar.qml

Modified
293 293 id: workspaceChip
295 295 readonly property bool active: !!pillWrap.modelData.is_focused
296 - readonly property string workspaceLabel: root.vertical ? String(pillWrap.modelData.idx || pillWrap.modelData.id || "?") : `${pillWrap.modelData.idx || pillWrap.modelData.id || "?"}${pillWrap.modelData.name ? ` ${pillWrap.modelData.name}` : ""}`.toLowerCase()
296 + readonly property string idxStr: String(pillWrap.modelData.idx || pillWrap.modelData.id || "?")
297 + readonly property string nameStr: pillWrap.modelData.name ? String(pillWrap.modelData.name).toLowerCase() : ""
298 + // vertical stacks idx over an abbreviated name; horizontal keeps "idx name" inline.
299 + readonly property string abbrName: root.formatService && workspaceChip.nameStr ? root.formatService.abbreviate(workspaceChip.nameStr) : ""
300 + readonly property string inlineLabel: workspaceChip.nameStr ? `${workspaceChip.idxStr} ${workspaceChip.nameStr}` : workspaceChip.idxStr
298 302 anchors.centerIn: parent
299 - width: Math.max(30, workspaceText.implicitWidth + 16)
300 - height: 22
303 + width: Math.max(30, workspaceContent.implicitWidth + (root.vertical ? 12 : 16))
304 + height: root.vertical ? (workspaceContent.implicitHeight + 8) : 22
301 305 radius: 8
302 306 color: root.theme ? (active ? root.theme.withAlpha(root.theme.ui.focus, 0.28) : root.theme.withAlpha(root.theme.ui.minor, 0.1)) : "transparent"
303 307 border.width: 0
305 - NuguText {
306 - id: workspaceText
309 + Column {
310 + id: workspaceContent
308 312 anchors.centerIn: parent
309 - theme: root.theme
310 - variant: "meta"
311 - text: workspaceChip.workspaceLabel
312 - color: !root.theme ? "transparent" : (workspaceChip.active ? root.theme.ui.accent : root.theme.ui.normal)
313 + spacing: 0
315 + NuguText {
316 + anchors.horizontalCenter: parent.horizontalCenter
317 + theme: root.theme
318 + variant: "meta"
319 + text: root.vertical ? workspaceChip.idxStr : workspaceChip.inlineLabel
320 + color: !root.theme ? "transparent" : (workspaceChip.active ? root.theme.ui.accent : root.theme.ui.normal)
323 + NuguText {
324 + visible: root.vertical && text.length > 0
325 + anchors.horizontalCenter: parent.horizontalCenter
326 + theme: root.theme
327 + variant: "meta"
328 + font.pixelSize: 10
329 + text: root.vertical ? workspaceChip.abbrName : ""
330 + color: !root.theme ? "transparent" : (workspaceChip.active ? root.theme.ui.accent : root.theme.ui.minor)
315 334 MouseArea {