dotfiles bugabingas dorkfiles
owned by bugabinga
README Source History Refs Compare Notes Search notifications: invoke the default action by clicking the card body 3e2fc0dc80cde028da724c4f52244411d86fcaaa
Oliver Jan Krylow <oliver@bugabinga.net > · 27 Jun 2026
unsigned
Browse files Compare with HEAD
freedesktop treats an action with id "default" as the one fired by
clicking the notification itself, not a labelled button. Filter "default"
out of the action button Flow and invoke it from the card's body click
(buttons declared later still sit above the body area, so explicit actions
are unaffected). Verified end-to-end: clicking routes to the native action.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Changed files (1) quickshell/nuguland/NotificationCard.qml Modified 76 76 visible:
String (card.modelData.urgency
|| "normal" )
!== "low" 82 + readonly property var defaultAction: (modelData.actionRows
|| []).find((a)
=> a.id
=== "default" )
|| null 83 + readonly property bool hasDefault:
!! defaultAction
80 86 anchors.fill: parent
81 87 acceptedButtons :
Qt .LeftButton
82 - enabled : card.compact
83 - onClicked : card.dismiss(
String (card.modelData.id))
88 + enabled : card.compact
|| card.hasDefault
90 + if (card.hasDefault)
91 + card.invokeAction(
String (card.modelData.id),
"default" );
93 + card.dismiss(
String (card.modelData.id));
204 215 width: parent.width
206 217 visible:
! card.compact
&& actionModel.length
> 0 207 - property
var actionModel: (card.modelData.actionRows
|| []).filter((a)
=> a.kind
!== "close" && a.kind
!== "copy-body" )
218 + property
var actionModel: (card.modelData.actionRows
|| []).filter((a)
=> a.kind
!== "close" && a.kind
!== "copy-body" && a.id
!== "default" )
209 220 model : parent.actionModel
210 221 delegate : Rectangle {