quickshell: segment bar groups, pin server glance
This commit is contained in:
parent
4df4062806
commit
7bfd1e25c3
1 changed files with 214 additions and 179 deletions
|
|
@ -775,6 +775,20 @@ in
|
|||
font.pixelSize: 16
|
||||
}
|
||||
|
||||
// ── BarSep: hairline between widget groups in the bar column.
|
||||
// Wrapped in a plain Item because a Column refuses to position
|
||||
// children that set their own horizontalCenter anchor.
|
||||
component BarSep: Item {
|
||||
width: Theme.barWidth
|
||||
height: 1
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: 16
|
||||
height: 1
|
||||
color: Theme.base02
|
||||
}
|
||||
}
|
||||
|
||||
// ── GlanceStat: a bar-column stat — clock-sized value over a
|
||||
// faded 9px caption (the server glance rows).
|
||||
component GlanceStat: Column {
|
||||
|
|
@ -1621,9 +1635,11 @@ in
|
|||
precision: SystemClock.Minutes
|
||||
}
|
||||
|
||||
// ── Top cluster: logo, clock, workspaces. The bar is a column
|
||||
// now, so the two clusters anchor to opposite ends and the gap
|
||||
// between them is the OSD slot.
|
||||
// ── Top cluster: logo, clock, workspaces — the three groups
|
||||
// that belong to "this machine, right now", split by hairlines.
|
||||
// The server glance is NOT here: it anchors above the bottom
|
||||
// cluster instead, so adding a workspace grows this column
|
||||
// downward into empty space rather than shoving the stats.
|
||||
Column {
|
||||
id: barTop
|
||||
anchors.top: parent.top
|
||||
|
|
@ -1663,6 +1679,8 @@ in
|
|||
}
|
||||
}
|
||||
|
||||
BarSep {}
|
||||
|
||||
// Clock — HH over mm; "HH:mm" does not fit a 46px column.
|
||||
Item {
|
||||
id: clockText
|
||||
|
|
@ -1713,6 +1731,8 @@ in
|
|||
}
|
||||
}
|
||||
|
||||
BarSep {}
|
||||
|
||||
// Workspace dots: accent pill for the focused workspace,
|
||||
// dim dots otherwise. Stacked vertically now, so the
|
||||
// focused pill grows along HEIGHT rather than width.
|
||||
|
|
@ -1753,6 +1773,12 @@ in
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ── Mid cluster: the server glance, pinned just above the
|
||||
// bottom cluster. Its own anchor (not a barTop child) is the
|
||||
// whole point: workspace count then changes nothing here.
|
||||
//
|
||||
// Server monitor: one persistent SSH streaming `top -b`
|
||||
// from the mediaserver (2s ticks, parsed line by line —
|
||||
// no per-poll reconnects) plus a streaming ping to the
|
||||
|
|
@ -1762,6 +1788,14 @@ in
|
|||
id: srvWidget
|
||||
width: Theme.barWidth
|
||||
height: srvGlanceCol.height
|
||||
anchors.horizontalCenter: barBgRect.horizontalCenter
|
||||
anchors.bottom: barBottom.top
|
||||
anchors.bottomMargin: 20
|
||||
// Fades out while the OSD takes this slot.
|
||||
opacity: osdItem.shown ? 0 : 1
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: Theme.animContent }
|
||||
}
|
||||
|
||||
property bool connected: false
|
||||
property real cpu: 0
|
||||
|
|
@ -1939,11 +1973,10 @@ in
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ── Bottom cluster: status icons, tray, power button. Anchored
|
||||
// to the bottom edge so the gap above it — between here and the
|
||||
// workspace dots — stays free as the OSD slot.
|
||||
// to the bottom edge; the server glance sits just above it and
|
||||
// the OSD borrows that same slot while it is on screen.
|
||||
Column {
|
||||
id: barBottom
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
@ -2294,7 +2327,7 @@ in
|
|||
|
||||
// Group separator: status icons / tray / power read
|
||||
// as three clusters instead of one clump.
|
||||
Item { width: Theme.barWidth; height: 10 }
|
||||
BarSep {}
|
||||
|
||||
// Tray icons — stacked, like everything else in the column
|
||||
Column {
|
||||
|
|
@ -2382,7 +2415,7 @@ in
|
|||
|
||||
// Group separator: status icons / tray / power read
|
||||
// as three clusters instead of one clump.
|
||||
Item { width: Theme.barWidth; height: 10 }
|
||||
BarSep {}
|
||||
|
||||
// Power menu opener — bottom-left corner. Opens the same
|
||||
// session menu as Super+L, which now unfolds from here.
|
||||
|
|
@ -4168,10 +4201,12 @@ in
|
|||
property real value: 0
|
||||
property color fill: Theme.base0D
|
||||
|
||||
// Takes over the server glance's slot: fixed position, no
|
||||
// dependence on how tall the workspace column has grown.
|
||||
width: Theme.barWidth
|
||||
height: 170
|
||||
anchors.horizontalCenter: barBgRect.horizontalCenter
|
||||
anchors.top: barTop.bottom
|
||||
anchors.bottom: barBottom.top
|
||||
anchors.verticalCenter: srvWidget.verticalCenter
|
||||
opacity: shown ? 1 : 0
|
||||
visible: opacity > 0.01
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue