Repository navigation
Message / notification API #340
HelmicNewciv
started this conversation in
Feature requests / ideas
Replies: 1 comment 1 reply
|
I just explored glide.d.ts file in ~/.config/glide and notice it has Notifications namespace wrapped. async function notify(title: string, message: string, options?: Partial<browser.notifications.CreateNotificationOptions>) {
return browser.notifications.create(undefined, {
type: "basic",
title,
message,
iconUrl: "chrome://branding/content/icon32.png",
...options,
});
}
glide.excmds.create(
{ name: "notify_test", description: "Send test notification" },
async () => notify("Glide", "manual trigger works")
);
glide.keymaps.set("normal", "<leader>n", "notify_test");Glide might have more hidden gems to tweak. People should post more on #147 !! |
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
Maybe I'm just not finding it, but it would be helpful to have some way to display a notification or message through the API. You can sorta do it by using
glide.commandline.showbut that's clearly set up for you to pick an option from a list rather than temporarily displaying, say, a visual confirmation that your mpv script is currently running (ie you hit the right button).The notifications displayed up top may work, but ideally there should be options to have those notifications automatically dismiss (such as for quick confirmations). Coming from qutebrowser I'm already pretty used to notifications showing up where glide has its command line.
All reactions