dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search notifications: delete orphaned telemetry/descriptor blobs and drag IPC 302f7c3bb9d6e1bb9f3625e833fc8f48447d52cc
Oliver Jan Krylow <oliver@bugabinga.net > · 26 Jun 2026
unsigned
Browse files Compare with HEAD
Removed dead symbols: notificationPanelContract, dragDismissContract,
scrollableListChrome, pointerTrace, recordPointerEvent, dragNotification,
dismissThresholdRatio, persistenceShape, groupedByAppLatestFirst,
horizontalActionRows. Removed the notificationsDrag IPC from shell.qml.
Kept widgetState and its role helpers (still called by notificationWidgetState
IPC) and removalLifecycleLock (still used by closeNotification). Also pruned
transient-only entries from nativeNotifications in dismissToast/dismissToasts
to prevent orphaned native tracking entries.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changed files (2) quickshell/nuguland/Notifications.qml Modified 16 16 property var activeToasts: []
17 17 property
var toastById: ({})
18 18 readonly property int defaultToastTimeoutMs:
5000 19 - property
var pointerTrace: []
20 19 property
var lastAction: ({
22 21 readonly property bool nativeActionRoute:
true 23 22 readonly property bool usesNativeNotificationServer:
true 24 - readonly property bool groupedByAppLatestFirst:
true 25 - readonly property bool horizontalActionRows:
true 26 - readonly property real dismissThresholdRatio:
0.35 27 23 readonly property int groupPreviewCount:
1 28 24 readonly property bool removalLifecycleLock:
true 29 - readonly property var dragDismissContract: ({
30 - "source" :
"Nuguland NotifGroupList.qml" ,
32 - "dismissThresholdRatio" : dismissThresholdRatio,
33 - "snapBackTransition" :
"drag-snap-back" ,
34 - "commitTransition" :
"drag-dismiss-commit" ,
35 - "removalLifecycleLock" : removalLifecycleLock,
36 - "modelLock" :
"lock-until-remove-animation-finished" 38 - readonly property
var persistenceShape: [
"id" ,
"appName" ,
"summary" ,
"body" ,
"time" ,
"urgency" ,
"actions" ]
40 26 function activeRole () {
299 285 function dismissToast (id) {
300 - activeToasts
= activeToasts.filter((x)
=> x
!== String (id));
286 + const sid
= String (id);
287 + const toast
= toastById[sid];
288 + activeToasts
= activeToasts.filter((x)
=> x
!== sid);
301 289 const map
= Object .
assign ({}, toastById);
302 - delete map[
String (id)];
292 + if (toast
&& toast.transient) {
293 + const nmap
= Object .
assign ({}, nativeNotifications);
295 + nativeNotifications
= nmap;
304 297 return stateJson();
307 300 function dismissToasts () {
301 + const tmap
= toastById;
308 302 activeToasts
= [];
309 303 toastById
= ({});
304 + const nmap
= Object .
assign ({}, nativeNotifications);
305 + let pruned
= false ;
306 + for (
const tid
in tmap) {
307 + if (tmap[tid]
&& tmap[tid].transient) {
313 + nativeNotifications
= nmap;
310 314 return stateJson();
354 - function notificationPanelContract () {
356 - "source" :
"Nuguland NotifGroup.qml NotifGroupList.qml NotifActionList.qml" ,
357 - "ownedBy" :
"PopoutHost.qml inline NotificationGroup" ,
358 - "groupedCardPanel" :
true ,
359 - "appMediaSlot" :
true ,
360 - "expandPill" :
true ,
361 - "animatedExpandHeight" :
true ,
362 - "maskedHorizontalActionRail" :
true ,
363 - "visiblePreviewCount" : groupPreviewCount,
364 - "actionRailKinds" : [
"close" ,
"server-action" ,
"copy-body" ],
365 - "pointerParity" : [
"left-toggle-expand" ,
"middle-close" ,
"horizontal-drag-dismiss" ],
366 - "keyboardParity" : [
"Return" ,
"Space" ,
"Escape" ],
367 - "dismissThresholdRatio" : dismissThresholdRatio,
368 - "realNotificationServer" :
true ,
369 - "noSyntheticNotifications" :
true 373 - function scrollableListChrome (rowCount) {
374 - const count
= Math .
max (
0 ,
Number (rowCount));
375 - const scrollable
= count
> 1 ;
377 - "source" :
"Nuguland ScrollEdgeFade.qml plus Nuguland FlickMonitor.qml" ,
378 - "scrollEdgeFade" :
true ,
379 - "topEdgeFade" :
false ,
380 - "bottomEdgeFade" : scrollable,
383 - "visible" : scrollable,
384 - "icon" :
"notifications" ,
386 - "tooltip" :
"scroll notifications" 390 - "velocitySamples" :
6 ,
391 - "events" : [
"pressed" ,
"positionChanged" ,
"released" ]
396 - function recordPointerEvent (kind, notificationId, x, y, deltaX) {
397 - const rows
= pointerTrace.slice(
Math .
max (
0 , pointerTrace.length
- 15 ));
400 - "notificationId" : notificationId,
405 - pointerTrace
= rows;
408 358 function stateObject () {
409 359 const active
= notifications.filter((n)
=> {
410 360 return ! n.closed;
416 366 "nativeActionRoute" : nativeActionRoute
, 417 367 "syntheticNotifications" :
false , 418 368 "trackedNativeCount" :
Object .keys(nativeNotifications).length
, 419 - "groupedByAppLatestFirst" : groupedByAppLatestFirst
, 420 - "horizontalActionRows" : horizontalActionRows
, 421 369 "expandedGroups" : expandedGroups.slice(
0 )
, 422 370 "groupPreviewCount" : groupPreviewCount
, 423 - "dismissThresholdRatio" : dismissThresholdRatio
, 424 - "dragDismissContract" : dragDismissContract
, 425 - "notificationPanelContract" :
notificationPanelContract ()
, 427 372 "popupInhibition" : dnd
|| popupInhibition
, 435 380 "unreadCount" : unreadCount
, 436 381 "activeCount" : active.length
, 437 382 "groups" : grouped
, 438 - "scrollableListChrome" :
scrollableListChrome (grouped.length)
, 439 383 "actionKinds" : [
"close" ,
"server-action" ,
"copy-body" ]
, 440 - "persistenceShape" : persistenceShape
, 441 384 "discardAll" :
true , 442 385 "removalLifecycleLock" : removalLifecycleLock
, 443 - "pointerTrace" : pointerTrace
, 444 386 "lastAction" : lastAction
, 445 387 "activeToasts" :
activeToastRows ()
550 492 return stateJson ();
553 - function dragNotification (notificationId, deltaX, width) {
554 - const id
= String (notificationId);
555 - const x
= Number (deltaX);
556 - const rowWidth
= Math .
max (
1 ,
Number (width));
557 - const ratio
= Math .
abs (x)
/ rowWidth;
558 - const committed
= ratio
>= dismissThresholdRatio;
559 - const transition
= committed
? "drag-dismiss-commit" : "drag-snap-back" ;
560 - for (
let i
= 0 ; i
< notifications.length; i
++ ) {
561 - const n
= notifications[i];
566 - closeNotification(n);
569 - "kind" :
"dragDismiss" ,
573 - "ratio" :
Math .
round (ratio
* 1000 )
/ 1000 ,
574 - "committed" : committed,
575 - "transition" : transition,
576 - "removalLifecycleLock" : committed
? removalLifecycleLock
: false 578 - notifications
= notifications.slice(
0 );
579 - return stateJson();
582 - "kind" :
"dragDismiss" ,
586 - "ratio" :
Math .
round (ratio
* 1000 )
/ 1000 ,
587 - "committed" :
false ,
588 - "transition" :
"missing" ,
589 - "removalLifecycleLock" :
false 591 - return stateJson();
594 495 function discardAllNotifications () {
595 496 notifications
= [];
quickshell/nuguland/shell.qml Modified 584 584 return notifications.toggleGroup(appName);
587 - function notificationsDrag (id: string, deltaX: real, width: real) : string {
588 - return notifications.dragNotification(id, deltaX, width);
591 587 function notificationsDiscardAll () : string {
592 588 return notifications.discardAllNotifications();