repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

notifications: demote copy-body to a subtle hover affordance

9c69dc3608db98d26bf16ccf369c0582c3a0af6d

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Copy body rendered as a full action pill alongside the server actions,
giving a secondary utility the same weight as primary actions. Filter it
out of the action Flow and surface it as a small low-key "copy" control in
the meta row that fades in on hover and only appears when there is a body.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Changed files (1)

quickshell/nuguland/NotificationCard.qml

Modified
112 112 theme: card.theme
113 113 variant: "meta"
114 114 text: card.modelData.appName || "unknown"
115 - width: parent.width - timeText.width - parent.spacing
115 + width: parent.width - timeText.width - copyBtn.width - parent.spacing * 2
116 116 elide: Text.ElideRight
118 + // subtle copy-body affordance: small and low-key, surfaced only
119 + // on hover and only when there is a body — deliberately NOT a
120 + // pill like the server actions below.
121 + Item {
122 + id: copyBtn
123 + width: visible ? copyGlyph.implicitWidth + 6 : 0
124 + height: timeText.implicitHeight
125 + visible: (card.modelData.body || "").length > 0
126 + CardText {
127 + id: copyGlyph
128 + anchors.centerIn: parent
129 + theme: card.theme
130 + variant: "meta"
131 + text: "copy"
132 + opacity: copyArea.containsMouse ? 1 : (cardHover.hovered ? 0.5 : 0)
133 + Behavior on opacity { NumberAnimation { duration: card.theme && card.theme.lowPowerMode ? 0 : 120 } }
135 + MouseArea {
136 + id: copyArea
137 + anchors.fill: parent
138 + hoverEnabled: true
139 + onClicked: card.invokeAction(String(card.modelData.id), "copy-body")
118 142 CardText {
119 143 id: timeText
120 144 theme: card.theme
154 178 width: parent.width
155 179 spacing: 6
156 180 visible: !card.compact && actionModel.length > 0
157 - property var actionModel: (card.modelData.actionRows || []).filter((a) => a.kind !== "close")
181 + property var actionModel: (card.modelData.actionRows || []).filter((a) => a.kind !== "close" && a.kind !== "copy-body")
158 182 Repeater {
159 183 model: parent.actionModel
160 184 delegate: Rectangle {