Closed fdinardo closed 4 years ago
Hi @fdinardo , I can't find any ways to edit them.
I am wondering if there is a way to edit the notification (like a new message received) and the OSD notification (like volume up/down) animations
You could monkey patch the method that sends the notification and change it to whatever you want.
Basically:
const originalMethod = stuff.moreStuff.WhatEverMethod;
function enable() {
// maybe do stuff?
stuff.moreStuff.WhatEverMethod = monkeyPatch;
// maybe do more stuff?
}
function disable() {
// maybe do stuff?
stuff.moreStuff.WhatEverMethod = originalMethod;
// maybe do more stuff?
}
function monkeyPatch(randomArg) {
// Alter functionality.
// may be even?
// originalMethod(randomArg);
}
If the methods that handle the messages are signal handlers (they probably are) you can just disconnect the default handler and connect your own. Even if there's not a reference to the handler id you can find it with a combination of GObject.signal_parse_name
and GObject.signal_handler_find
. so you can disconnect the stock handler.
Thanks @JasonLG1979 for explaining the process.
Notification and OSD animations are now implemented in new-version branch.
Hi, when this will be pushed to the extension website?
@fdinardo, Sorry for the delay. I'll upload once version 10 is done. ( shortly ).
Hi, Thanks for this extension.
I am wondering if there is a way to edit the notification (like a new message received) and the OSD notification (like volume up/down) animations
Thanks