Add native notifications with OSD-style banners and a Control Center module
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>
This commit is contained in:
1 parent
d7f0498ba0
commit
395de70b26
17 files changed
+1132
-13
No files matched your search
@@ -1,8 +1,11 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import "../controls"
|
||||
import "../../components"
|
||||
import "../../controlcenter/modules" as Modules
|
||||
import "../../services"
|
||||
import "../../theme"
|
||||
|
||||
SettingsPage {
|
||||
Modules.Dnd {
|
||||
@@ -10,6 +13,80 @@ SettingsPage {
|
||||
}
|
||||
SettingNote {
|
||||
warning: true
|
||||
text: SystemService.error
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user