dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search feat(nuguland): subtle active-state dot on bar widgets d482c1ef3fd8a45a99739ef001a8608a0957182f
Oliver Jan Krylow <oliver@bugabinga.net > · 26 Jun 2026
unsigned
Browse files Compare with HEAD
Widgets with 'something active inside' get a small accent dot top-right:
media playing, notifications unread, tray attention, idle inhibited,
audio mic/cam in use. Adds a cheap reactive Media.playing signal and a
Bar.chipActive() resolver. Dot hides when the chip is selected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changed files (2) quickshell/nuguland/Bar.qml Modified 90 + function chipActive (name) {
91 + switch (
String (name)) {
93 + return !! (root.mediaService
&& root.mediaService.playing);
94 + case "notifications" :
95 + return !! (root.notificationService
&& root.notificationService.unreadCount
> 0 );
97 + return !! (root.trayService
&& root.trayService.attentionCount
> 0 );
99 + return !! (root.idleService
&& root.idleService.enabled);
101 + return !! (root.audioService
&& root.audioService.privacyActive());
89 106 function itemRectInBar (item) {
513 530 required property string label
514 531 property int preferredWidth:
Math .max(
52 , labelText.implicitWidth
+ 18 )
515 532 readonly property bool selected: root.surfaces
&& root.surfaces.popoutName
=== popoutName
533 + readonly property bool active: root.chipActive(popoutName)
517 535 Layout .preferredWidth: preferredWidth
518 536 Layout .preferredHeight:
26 570 + visible : chip.active
&& ! chip.selected
574 + anchors.top: parent.top
575 + anchors.right: parent.right
576 + anchors.topMargin:
4 577 + anchors.rightMargin:
5 578 + color : root.theme
? root.theme.ui.accent
: "white" 582 + Behavior on opacity {
584 + duration : root.theme
&& root.theme.lowPowerMode
? 0 : 160 585 + easing.type:
Easing .OutCubic
550 593 theme : root.theme
551 594 checked : chip.selected
quickshell/nuguland/Media.qml Modified 19 19 readonly property bool nativeActionRoute:
true 21 + readonly property bool playing: {
22 + const players
= Mpris .players.values
|| [];
23 + for (
let i
= 0 ; i
< players.length; i
++ )
if (players[i].playbackState
=== MprisPlaybackState .Playing)
21 29 function playbackStateText (player) {
22 30 return String (
MprisPlaybackState .
toString (player.playbackState
|| MprisPlaybackState .Stopped)).toLowerCase();