dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search feat(nuguland): unified clock renderer + left-aligned workspace tray bc9d60515fce5b535f471223403bb4c2fdb50fa0
Oliver Jan Krylow <oliver@bugabinga.net > · 28 Jun 2026
unsigned
Browse files Compare with HEAD
Share one NuguClock component across both orientations: HH and MM split
by a thin accent rule (Rectangle, no glyph) — stacked in a column when
vertical, in a row when horizontal, replacing the plain HH:MM chip. Also
left-align the horizontal workspace tray so it no longer floats centred
with empty space before it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changed files (1) quickshell/nuguland/Bar.qml Modified 170 170 color: root.theme
? root.theme.withAlpha(root.theme.ui.accent,
0.55 )
: "transparent" 178 182 visible :
! root.vertical
179 - popoutName :
"clock" 180 - label : root.chipLabel(
"clock" )
181 - width : preferredWidth
187 183 x :
Math .
min (parent.width
/ 2 - width
/ 2 , widgetsRow.x
- width
- 12 )
188 184 anchors.verticalCenter: parent.verticalCenter
198 - readonly property bool
selected : root.surfaces
&& root.surfaces.popoutName
=== "clock" 199 - readonly property
var clockParts:
String (root.chipLabel(
"clock" )).split(
":" )
200 - readonly property string
hh : clockStack.clockParts[
0 ]
|| "--" 201 - readonly property string
mm : clockStack.clockParts[
1 ]
|| "--" 203 191 visible : root.vertical
204 - width :
Math .
max (
34 , stackColumn.implicitWidth
+ 12 )
205 - height : stackColumn.implicitHeight
+ 12 207 192 anchors.horizontalCenter: parent.horizontalCenter
208 193 y :
Math .
min (parent.height
/ 2 - height
/ 2 , widgetsRow.y
- height
- 12 )
209 - color :
! root.theme
? "transparent" : (selected
? root.theme.ui.focus
: root.theme.withAlpha(root.theme.ui.minor,
0.1 ))
211 - Component .onCompleted:
Qt .callLater(()
=> root.registerAnchor(
"clock" , clockStack))
212 - onXChanged : root.registerAnchor(
"clock" , clockStack)
213 - onYChanged : root.registerAnchor(
"clock" , clockStack)
214 - onWidthChanged : root.registerAnchor(
"clock" , clockStack)
215 - onHeightChanged : root.registerAnchor(
"clock" , clockStack)
220 - anchors.centerIn: parent
224 - anchors.horizontalCenter: parent.horizontalCenter
227 - text : clockStack.hh
228 - color :
! root.theme
? "transparent" : (clockStack.selected
? root.theme.content.backdrop
: root.theme.content.normal)
232 - anchors.horizontalCenter: parent.horizontalCenter
236 - color : root.theme
? root.theme.ui.accent
: "transparent" 240 - anchors.horizontalCenter: parent.horizontalCenter
243 - text : clockStack.mm
244 - color :
! root.theme
? "transparent" : (clockStack.selected
? root.theme.content.backdrop
: root.theme.content.normal)
250 - checked : clockStack.selected
253 - root.surfaces.hoverRegisteredPopout(
"clock" );
258 - root.activatePopout(
"clock" );
320 252 implicitHeight: tray.height
321 253 Layout .preferredWidth: tray.width
322 254 Layout .preferredHeight: tray.height
323 - Layout .alignment:
Qt .AlignCenter
257 + Layout .alignment: root.vertical
? Qt .AlignHCenter
: (
Qt .AlignLeft
| Qt .AlignVCenter)
661 + component
NuguClock :
Rectangle {
664 + property bool
stacked :
false 665 + readonly property bool
selected : root.surfaces
&& root.surfaces.popoutName
=== "clock" 666 + readonly property
var clockParts:
String (root.chipLabel(
"clock" )).split(
":" )
667 + readonly property string
hh : clk.clockParts[
0 ]
|| "--" 668 + readonly property string
mm : clk.clockParts[
1 ]
|| "--" 670 + implicitWidth : clockContent.implicitWidth
+ (stacked
? 12 : 16 )
671 + implicitHeight : clockContent.implicitHeight
+ (stacked
? 12 : 8 )
672 + width : implicitWidth
673 + height : implicitHeight
675 + color :
! root.theme
? "transparent" : (selected
? root.theme.ui.focus
: root.theme.withAlpha(root.theme.ui.minor,
0.1 ))
677 + Component .onCompleted:
Qt .callLater(()
=> root.registerAnchor(
"clock" , clk))
678 + onXChanged : root.registerAnchor(
"clock" , clk)
679 + onYChanged : root.registerAnchor(
"clock" , clk)
680 + onWidthChanged : root.registerAnchor(
"clock" , clk)
681 + onHeightChanged : root.registerAnchor(
"clock" , clk)
686 + anchors.centerIn: parent
687 + columns : clk.stacked
? 1 : 3 688 + rowSpacing : clk.stacked
? 3 : 0 692 + Layout .alignment:
Qt .AlignCenter
696 + color :
! root.theme
? "transparent" : (clk.selected
? root.theme.content.backdrop
: root.theme.content.normal)
700 + Layout .alignment:
Qt .AlignCenter
701 + width : clk.stacked
? 16 : 2 702 + height : clk.stacked
? 2 : 14 704 + color : root.theme
? root.theme.ui.accent
: "transparent" 708 + Layout .alignment:
Qt .AlignCenter
712 + color :
! root.theme
? "transparent" : (clk.selected
? root.theme.content.backdrop
: root.theme.content.normal)
718 + checked : clk.selected
721 + root.surfaces.hoverRegisteredPopout(
"clock" );
726 + root.activatePopout(
"clock" );
724 732 component
BarChip :
Rectangle {