Files
dotfiles/quickshell/popouts/NotifPopout.qml
T
nvrlandClaude Opus 5.5 d6de04eaaf feat(quickshell): notifications as a NieR message log in a corner drawer
Notifications were still Persona: separate floating cards with an urgency
slash down the leading edge, action chips that filled with the accent on
hover, and a 60px shove in from the right.

NotifCard is now laid out like an entry in NieR's message log: a square
urgency marker and the sender's name running into a hairline, the summary
and body set in from the marker, and hairline action buttons with their
own small marker that lift on hover instead of inverting. It draws no
panel; rest is bare and hover lifts the row onto the surface tone.
Critical entries take the red into the marker and the sender line only.

The toast stack is one hull drawer docked into the opening's top-right
corner — off the bar through one fillet, onto the rail through the other,
the same construction as a corner-docked popout. It grows with its
entries and slides back behind the frame when the last one goes. Each
entry's countdown is a hairline along its foot, and new entries fade in
place. The history popout lists the same entries flush.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 20:48:30 +02:00

108 lines
2.9 KiB
QML

import QtQuick
import Quickshell
import Quickshell.Services.Notifications
import "root:/config"
import "root:/components"
import "root:/services"
// Notification history and the do-not-disturb switch.
Popout {
id: root
contentWidth: 400
contentHeight: 380
PopoutSurface {
anchors.fill: parent
tone: Notifs.dnd ? Theme.muted : Theme.primary
PopoutHeader {
id: header
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
title: "Notifications"
icon: Notifs.icon
accent: Notifs.dnd ? Theme.muted : Theme.primary
subtitle: Notifs.count + " HELD"
}
Row {
id: controls
anchors.top: header.bottom
anchors.topMargin: Theme.padM
anchors.left: parent.left
spacing: Theme.padS
P5Button {
text: Notifs.dnd ? "Silenced" : "Silence"
icon: Notifs.dnd ? "󰂛" : "󰂚"
accent: Notifs.dnd ? Theme.treatmentOffText : Theme.primary
onClicked: Notifs.toggleDnd()
}
P5Button {
text: "Clear"
icon: "󰎟"
destructive: true
onClicked: Notifs.clearAll()
}
}
Text {
anchors.centerIn: parent
visible: Notifs.count === 0
text: "NOTHING TO REPORT"
color: Theme.muted
font.family: Theme.fontDisplay
font.pixelSize: Theme.fsBody
font.weight: Font.DemiBold
font.letterSpacing: 3
renderType: Text.NativeRendering
}
ListView {
anchors.top: controls.bottom
anchors.topMargin: Theme.padM
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
clip: true
// Entries carry their own header hairline, so they sit flush.
spacing: 0
model: Notifs.history
delegate: NotifCard {
required property var modelData
width: ListView.view.width
notif: modelData
onDismissed: Notifs.dismiss(modelData)
}
add: Transition {
NumberAnimation {
property: "opacity"
from: 0; to: 1
duration: Theme.durBase
}
}
remove: Transition {
NumberAnimation {
property: "opacity"
to: 0
duration: Theme.durFast
}
}
displaced: Transition {
NumberAnimation {
properties: "y"
duration: Theme.durBase
easing.type: Easing.OutExpo
}
}
}
}
}