Change window alert setting names and defaults
- Notifications.alert_time → Notifications.flash_time, more evocative of what these "alerts" actually do - Change default for the above from 0 to 5, since now push rules already control precisely what to enable or disable these alerts for - Notifications.urgent_alert_time → Notifications.highlight_flash_time, "highlight" is the term used in the matrix doc
This commit is contained in:
parent
0ca8d46eae
commit
1017d02a83
|
@ -8,7 +8,6 @@
|
||||||
- profiles missing in notifications
|
- profiles missing in notifications
|
||||||
- option to use plaintext notifications
|
- option to use plaintext notifications
|
||||||
- Notification urgency level (plyer)?
|
- Notification urgency level (plyer)?
|
||||||
- Rename the alertOn(Mention/Message)ForMsec options, default Message to non-0
|
|
||||||
- Make local unread counter an optional turned off by default
|
- Make local unread counter an optional turned off by default
|
||||||
|
|
||||||
- Implement fallback QML notifications, usable if dbus isn't available
|
- Implement fallback QML notifications, usable if dbus isn't available
|
||||||
|
|
|
@ -40,16 +40,18 @@ class Presence:
|
||||||
auto_away_after: int = 60 * 10
|
auto_away_after: int = 60 * 10
|
||||||
|
|
||||||
class Notifications:
|
class Notifications:
|
||||||
# How long in seconds window alerts will last when a new message
|
# How long in seconds the window will flash in your dock or taskbar when
|
||||||
# is posted in a room. On most desktops, this highlights or flashes the
|
# a new message, which matches a notification push rule with a
|
||||||
# application in the taskbar or dock.
|
# flash (lightbulb) action, is posted in a room.
|
||||||
# Can be set to 0 for no alerts.
|
# The effect may differ depending on your OS/desktop.
|
||||||
|
# or dock to be highlighted or to flash.
|
||||||
# Can be set to -1 for alerts that last until the window is focused.
|
# Can be set to -1 for alerts that last until the window is focused.
|
||||||
alert_time: float = 0
|
flash_time: float = 5
|
||||||
|
|
||||||
# Same as alert_time for urgent messages, e.g. when you are mentioned,
|
# Same as flash_time, but for messages that match a push rule with a
|
||||||
# replied to, or the message contains a keyword.
|
# highlight (red [+1]) action. By default this includes when your
|
||||||
urgent_alert_time: float = -1
|
# name is mentioned, replied to, or messages containing keywords.
|
||||||
|
highlight_flash_time: float = -1
|
||||||
|
|
||||||
class Scrolling:
|
class Scrolling:
|
||||||
# Use velocity-based kinetic scrolling.
|
# Use velocity-based kinetic scrolling.
|
||||||
|
|
|
@ -29,8 +29,8 @@ QtObject {
|
||||||
if (urgencyHint) {
|
if (urgencyHint) {
|
||||||
const msec =
|
const msec =
|
||||||
critical ?
|
critical ?
|
||||||
window.settings.Notifications.urgent_alert_time * 1000 :
|
window.settings.Notifications.highlight_flash_time * 1000 :
|
||||||
window.settings.Notifications.alert_time * 1000
|
window.settings.Notifications.flash_time * 1000
|
||||||
|
|
||||||
// -1 ? 0 for no time out : msec
|
// -1 ? 0 for no time out : msec
|
||||||
if (msec !== 0) window.alert(msec === -1 ? 0 : msec)
|
if (msec !== 0) window.alert(msec === -1 ? 0 : msec)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user