configurable notification timeout, default 3s
This commit is contained in:
parent
28fb0e4d00
commit
dea4541718
3 changed files with 11 additions and 3 deletions
|
|
@ -20,7 +20,8 @@ QtObject {
|
|||
enable: true
|
||||
})
|
||||
property var notifications: ({
|
||||
enable: true
|
||||
enable: true,
|
||||
timeout: 3000
|
||||
})
|
||||
property var mpris: ({
|
||||
enable: true
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import QtQuick
|
|||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Services.Notifications
|
||||
import "." as M
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
|
@ -84,7 +85,7 @@ QtObject {
|
|||
|
||||
// Auto-expire popup
|
||||
if (data.popup) {
|
||||
const timeout = notif.expireTimeout > 0 ? notif.expireTimeout : 5000;
|
||||
const timeout = notif.expireTimeout > 0 ? notif.expireTimeout : (M.Modules.notifications.timeout || 3000);
|
||||
Qt.callLater(() => {
|
||||
_expireTimer.createObject(root, {
|
||||
_notifId: data.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue