Krolyxon
Commit 8fda16f

Branches

Refs →

aurora8fda16f

aurora: drop notif bell, merge net+bt bar blocks

Author
krolyxon
Date
2026-10-27 20:27 +0530
Parent
36149c1
Commit
8fda16fdfc2ec1698ae272b01402d94094fb3eb1

+22 −18

2 files changed

  1. M .config/quickshell/aurora/Bar.qml +4 −17
  2. M .config/quickshell/aurora/BarPill.qml +18 −1
M .config/quickshell/aurora/Bar.qml View
@@ -157,18 +157,15 @@ PanelWindow {
157157 }
158158 }
159159
160+ // net + bt share one block: click the left icon for the net tab, the right one for bt
160161 BarPill {
161162 icon: Net.wired && !(Net.wifiEnabled && Net.connected !== "") ? Net.wiredIcon
162163 : (Net.wifiEnabled ? Theme.wifiIcon(Net.connected !== "" ? Net.activeSignal : 0) : Theme.iWifiOff)
163164 tint: Net.portal ? Theme.err : ((Net.wired || (Net.wifiEnabled && Net.connected !== "")) ? Theme.fg : Theme.dim)
165+ icon2: bar.adapter === null ? "" : (!bar.btOn ? Theme.iBtOff : (bar.btLink ? Theme.iBtConn : Theme.iBt))
166+ tint2: bar.btLink ? Theme.fg : Theme.dim
164167 onActivated: bar.togglePanel("net", bar.modelData)
165− }
166−
167− BarPill {
168− visible: bar.adapter !== null
169− icon: !bar.btOn ? Theme.iBtOff : (bar.btLink ? Theme.iBtConn : Theme.iBt)
170− tint: bar.btLink ? Theme.fg : Theme.dim
171− onActivated: bar.togglePanel("bt", bar.modelData)
168+ onActivated2: bar.togglePanel("bt", bar.modelData)
172169 }
173170
174171 BarPill {
@@ -180,16 +177,6 @@ PanelWindow {
180177 onActivated: bar.togglePanel("sys", bar.modelData)
181178 }
182179
183− BarPill {
184− icon: Notifs.dnd ? Theme.iBellOff : Theme.iBell
185− text: Notifs.count > 0 ? String(Notifs.count) : ""
186− tint: Notifs.dnd ? Theme.dim : Theme.fg
187− onActivated: button => {
188− if (button === Qt.RightButton) Notifs.dnd = !Notifs.dnd
189− else bar.togglePanel("notif", bar.modelData)
190− }
191− }
192−
193180 BarPill {
194181 icon: Theme.iCal
195182 text: Qt.formatDateTime(clock.date, "dd MMM yyyy")
M .config/quickshell/aurora/BarPill.qml View
@@ -7,7 +7,11 @@ Item {
77 property string text: ""
88 property color tint: Theme.fg
99 property color underline: Theme.accent
10+ // optional second icon in the same block, with its own click (activated2)
11+ property string icon2: ""
12+ property color tint2: Theme.fg
1013 signal activated(int button)
14+ signal activated2(int button)
1115 signal scrolled(int dir)
1216
1317 implicitWidth: row.implicitWidth + 24
@@ -45,13 +49,26 @@ Item {
4549 font.bold: true
4650 anchors.verticalCenter: parent.verticalCenter
4751 }
52+ Text {
53+ id: second
54+ visible: p.icon2 !== ""
55+ text: p.icon2
56+ color: p.tint2
57+ font.family: Theme.font
58+ font.pixelSize: Theme.fontSize + 1
59+ anchors.verticalCenter: parent.verticalCenter
60+ }
4861 }
4962 MouseArea {
5063 id: m
5164 anchors.fill: parent
5265 hoverEnabled: true
5366 acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
54− onClicked: mouse => p.activated(mouse.button)
67+ onClicked: mouse => {
68+ // split at the middle of the gap before the second icon
69+ if (second.visible && mouse.x >= row.x + second.x - row.spacing / 2) p.activated2(mouse.button)
70+ else p.activated(mouse.button)
71+ }
5572 onWheel: w => p.scrolled(w.angleDelta.y > 0 ? 1 : -1)
5673 }
5774 }