discord-screenaudio icon indicating copy to clipboard operation
discord-screenaudio copied to clipboard

Distributions and Environments integration

Open SimplyCEO opened this issue 2 years ago • 16 comments

SimplyCEO avatar Aug 17 '22 08:08 SimplyCEO

I might implement a different notification system, setting it optional. I will tell when the repository is ready to merge.

SimplyCEO avatar Aug 21 '22 10:08 SimplyCEO

I might implement a different notification system, setting it optional. I will tell when the repository is ready to merge.

What do you mean exactly? There are already two ways for a noticiation to show, why a third?

maltejur avatar Aug 21 '22 10:08 maltejur

Or are you talking about automatically detecting if kf5notifications is available? I have that already implemented on [this branch](https://github.com/maltejur/discord-screenaudio/tree/keybinds], but there are also some other changes there which arent ready yet.

maltejur avatar Aug 21 '22 10:08 maltejur

What do you mean exactly? There are already two ways for a noticiation to show, why a third?

I mean, it's so small. Changing the font size would help my eyes haha Also thought about using notify-send through the system, but would have to fetch the name, icon, and the text... maybe just making the current Qt notification better readable.

SimplyCEO avatar Aug 21 '22 11:08 SimplyCEO

Wait, so the standard qt notification isn't a normal system notification for you? Interesting, I am on KDE so it is completely integrated there.

maltejur avatar Aug 21 '22 11:08 maltejur

Wait, so the standard qt notification isn't a normal system notification for you? Interesting, I am on KDE so it is completely integrated there.

No. The standard notification here is notification-daemon. Without it, I won't receive any notifications at all.

SimplyCEO avatar Aug 21 '22 11:08 SimplyCEO

One thing that I couldn't make is to show the icon. Do you have any idea @maltejur ?

SimplyCEO avatar Aug 21 '22 13:08 SimplyCEO

I am currently not home so sorry for not working on your pull request so far. I am back in a week.

maltejur avatar Aug 23 '22 16:08 maltejur

No problem. There are few touches here and there that I need to make it look acceptable.

SimplyCEO avatar Aug 23 '22 19:08 SimplyCEO

One thing that I couldn't make is to show the icon. Do you have any idea @maltejur ?

This works for me:

notify-send --icon de.shorsh.discord-screenaudio Hello

image

maltejur avatar Aug 29 '22 17:08 maltejur

One thing that I couldn't make is to show the icon. Do you have any idea @maltejur ?

This works for me:

notify-send --icon de.shorsh.discord-screenaudio Hello

image

I mean, for the users' images. I made it by saving the image to /tmp folder. This one can apply by the installation process.

SimplyCEO avatar Aug 29 '22 17:08 SimplyCEO

Review the code, if you find any errors or changes you want to make. I have tried to do a "Reply" button. Successfully could make it interact with the application, but it opened another one for some reason.

SimplyCEO avatar Aug 29 '22 17:08 SimplyCEO

I mean, for the users' images. I made it by saving the image to /tmp folder. This one can apply by the installation process.

Oh yeah I see you already solved it. But I am having a few problems with it, one of those errors always occurs when a notification should be shown:

Screenshot_20220829_193240 Screenshot_20220829_193321

However when I add a qDebug() << command; in there, just for checking the command, it works just fine again. Some weird C++ thing is going on here.

I think it would be best if you would just rewrite that code using Qt stuff, to fix the error and to generally make the code more consistent.

maltejur avatar Aug 29 '22 17:08 maltejur

Some weird C++ thing is going on here.

Maybe because I used a function in C to return a "safe" message value back to the command. I tried doing the filter in C++, but it didn't let me.

SimplyCEO avatar Aug 29 '22 17:08 SimplyCEO

I can guess what it could be. Some notifications don't show up sometimes, maybe because of the string getting a value out of memory or weird value return.

SimplyCEO avatar Aug 29 '22 17:08 SimplyCEO

I think it would be best if you would just rewrite that code using Qt stuff, to fix the error and to generally make the code more consistent.

See https://github.com/KanuX-14/discord-screenaudio/pull/1

maltejur avatar Aug 29 '22 18:08 maltejur

Regarding the notification system: distributions like Pop_os don't use libnotify but use the standard systemd-notify to deliver notifications, keep that in mind :)

federicotorrielli avatar Oct 11 '22 08:10 federicotorrielli

distributions like Pop_os don't use libnotify but use the standard systemd-notify to deliver notifications

Thank you about this fact. I personally don't use Pop!_OS. If you know a way to implement it, feel free to push.

SimplyCEO avatar Oct 11 '22 10:10 SimplyCEO

I will look into this in this week or so. This doesn't only apply to Pop, there are many distributions using systemd-notify, ofc

federicotorrielli avatar Oct 11 '22 12:10 federicotorrielli

Closing, as it was already implemented.

SimplyCEO avatar Nov 09 '22 17:11 SimplyCEO