glassMxrph now owns org.freedesktop.Notifications. Banners drop out of the bar like the OSD; Control Center stacks history per app like macOS Notification Center. Do Not Disturb lives in the shell and falls back to SwayNC while another daemon holds the bus name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
93 lines
3.1 KiB
QML
93 lines
3.1 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
import "../controls"
|
|
import "../../components"
|
|
import "../../controlcenter/modules" as Modules
|
|
import "../../services"
|
|
import "../../theme"
|
|
|
|
SettingsPage {
|
|
Modules.Dnd {
|
|
Layout.fillWidth: true
|
|
}
|
|
SettingNote {
|
|
warning: true
|
|
text: NotificationService.enabled ? NotificationService.notice : ""
|
|
}
|
|
SettingsSection {
|
|
title: "Notifications"
|
|
description: "glassMxrph shows banners from the bar and keeps them in Control Center. Only one notification server can run; stop SwayNC, mako or dunst to use it."
|
|
PreferenceToggle {
|
|
label: "Built-in notifications"
|
|
description: "Takes effect when no other notification server is running"
|
|
icon: ""
|
|
setting: "notifications.enabled"
|
|
}
|
|
PreferenceToggle {
|
|
label: "Critical alerts during Do Not Disturb"
|
|
description: "Urgent notifications still show a banner"
|
|
icon: ""
|
|
setting: "notifications.criticalInDnd"
|
|
}
|
|
}
|
|
SettingsSection {
|
|
title: "Banners"
|
|
PreferenceChoice {
|
|
label: "Position"
|
|
icon: ""
|
|
setting: "notifications.position"
|
|
choices: ["top-right", "top-center"]
|
|
}
|
|
PreferenceChoice {
|
|
label: "Animation"
|
|
description: "Slide out of the bar, drop down, fade, or shrink to nothing"
|
|
icon: ""
|
|
setting: "notifications.animation"
|
|
choices: ["slide", "drop", "fade", "shrink"]
|
|
}
|
|
PreferenceSlider {
|
|
label: "Duration"
|
|
description: "Unless the app sets its own; critical alerts stay until dismissed"
|
|
icon: ""
|
|
setting: "notifications.timeout"
|
|
from: 1000
|
|
to: 30000
|
|
step: 500
|
|
unit: " ms"
|
|
}
|
|
PreferenceSlider {
|
|
label: "Banners at once"
|
|
description: "Older banners move to Control Center"
|
|
icon: ""
|
|
setting: "notifications.maxPopups"
|
|
from: 1
|
|
to: 6
|
|
step: 1
|
|
}
|
|
SettingRow {
|
|
title: "Test"
|
|
icon: ""
|
|
GlassButton {
|
|
objectName: "notificationTest"
|
|
text: "Send test notification"
|
|
enabled: NotificationService.active
|
|
onClicked: Quickshell.execDetached(["notify-send", "-a", "glassMxrph", "-i", "preferences-desktop-notification", "Notifications are working", "This is how banners from your apps will look."])
|
|
}
|
|
}
|
|
}
|
|
SettingsSection {
|
|
title: "Keybinds"
|
|
padded: true
|
|
Text {
|
|
Layout.fillWidth: true
|
|
wrapMode: Text.Wrap
|
|
color: Theme.text
|
|
font.family: "monospace"
|
|
font.pixelSize: 11
|
|
textFormat: Text.PlainText
|
|
text: "bind = $mod, M, exec, glassmxrph controlcenter\nbind = $mod SHIFT, N, exec, glassmxrph notifications dismiss\nbind = $mod CTRL, N, exec, glassmxrph notifications dnd"
|
|
}
|
|
}
|
|
}
|