Repository navigation
Replies: 3 comments
|
My plugin shows a keyboard shortcut hint after you do an action with the mouse, but the toast closes before you can read it. A longer toast time, or a toast that stays until you close it, would make these hints useful. |
0 replies
|
YES! If you're in the middle of something and the notification shows, you currently need to react immediately in order to jump to it. Related |
0 replies
|
I added support for this in my fork since I'm not permitted to open PRs here. It isn't perfect since the docs translations were made by an LLM so they need to be proofread: https://github.com/plumj-am/herdr/tree/patch/PlumJam-rtlokwtollyx You can also apply this patch and adjust the values if you use something like Nix: Raise the built-in notification timeouts.
The timeouts are hard-coded in two places: the server keeps an in-app
toast for a fixed number of seconds, and the client shell keeps a visible
notification for a fixed number of seconds.
--- a/src/app/api.rs
+++ b/src/app/api.rs
@@ -710,9 +710,9 @@
if self.state.toast != previous_toast {
self.toast_deadline = self.state.toast.as_ref().map(|toast| {
let duration = match toast.kind {
- ToastKind::NeedsAttention => Duration::from_secs(8),
- ToastKind::Finished => Duration::from_secs(5),
- ToastKind::UpdateInstalled => Duration::from_secs(3),
+ ToastKind::NeedsAttention => Duration::from_secs(60),
+ ToastKind::Finished => Duration::from_secs(20),
+ ToastKind::UpdateInstalled => Duration::from_secs(3),
};
Instant::now() + duration
});
--- a/src/client/shell/notification_policy.rs
+++ b/src/client/shell/notification_policy.rs
@@ -14,10 +14,10 @@
fn notification_duration(kind: SemanticNotificationKind) -> std::time::Duration {
std::time::Duration::from_secs(match kind {
- SemanticNotificationKind::NeedsAttention => 8,
- SemanticNotificationKind::Finished => 5,
- SemanticNotificationKind::UpdateInstalled => 3,
- SemanticNotificationKind::Custom => 5,
+ SemanticNotificationKind::NeedsAttention => 60,
+ SemanticNotificationKind::Finished => 20,
+ SemanticNotificationKind::UpdateInstalled => 3,
+ SemanticNotificationKind::Custom => 20,
})
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
The in-app toast notification disappears automatically after a fixed, hard-coded duration. There is no config option to control how long the toast stays visible.
Current
RawToastConfigonly exposes:ui.toast.delivery(herdr / system / terminal / clipboard)ui.toast.delay_seconds(delay before showing — not display length)ui.toast.herdr.position/ui.toast.system/ui.toast.terminalNone control the visible duration. When a toast pops I often look away and miss it before it auto-dismisses.
Proposal
Add a config option for how long the in-app toast stays on screen:
Support
duration_ms = 0(orpersist = true) to keep the toast until manually dismissed.Notes
delay_seconds(delay before showing). This is about display duration.delivery = "system"+ OS "Alerts" style can keep a notification on screen, but that depends on OS settings; I'd prefer the in-app toast to support a longer/persistent duration directly.herdr v0.8.0, macOS.
All reactions