rmirro icon indicating copy to clipboard operation
rmirro copied to clipboard

New notify-send doesn't support --print-id option anymore

Open nharrand opened this issue 2 years ago • 5 comments

Hello,

Thanks a lot for this project!

I just wanted to report that I had a slight issue when trying to make it work. It seems that at least Ubuntu 20.04's version of notify-send doesn't support several of the options used by this project (including --print-id).

If anyone encounters the same problem, I wanted to document that I used this script as a replacement for notify-send (and edited rmirro.py L59 to call the script instead of notify-send).

Hope it helps.

nharrand avatar Jan 11 '24 13:01 nharrand

Hello @nharrand

Could you kindly return the updated rmirro.py script? I'm running into a similar issue in Ubuntu 22.04 but can't figure the proper syntax to call notice.sh.

Thanks!

jvoix avatar May 05 '24 17:05 jvoix

Hello @jvoix

TLDR: I made a fork here. (It contains both my modifications of rmirro.py and the notify-send replacement. Hope it helps.)

Explanations: I simply replaced cmd = ["notify-send"] with cmd = [os.path.join(os.path.dirname(os.path.realpath(__file__)), "notify-send.sh")].

But after testing on a different machine I realized that on an other machine notify-send.sh doesn't return the id when --replace-id is used (which doesn't seem to be such a big deal since we already have the id at this point) so I also updated the line self.id = int(output) and changed it with self.id = self.id if self.id else int(output).

nharrand avatar May 06 '24 12:05 nharrand

Hi, both. Thanks for reporting this, and sorry for not getting back to you!

I think I should simplify the notification treatment, so it uses a straightforward solution that works on all systems (where notify-send exists). The id logic feels a little shaky, and is only meant to periodically update the notification for each rendered document, to display the progress. But that is not strictly necessary, and maybe also just distracting, and one can always check the terminal to see the progress, anyway. I'm considering removing it altogether, or replacing it with one/two notifications at the beginning/end of synchronization.

Can you check if this simplified command works on your systems?

notify-send --app-name=rmirro --urgency=normal --icon=input-tablet "The title" "The message" 

hersle avatar May 10 '24 19:05 hersle

Hi @hersle,

sorry for not getting back to you!

No worries!

I'm considering removing it altogether, or replacing it with one/two notifications at the beginning/end of synchronization.

I think that's a good idea.

Can you check if this simplified command works on your systems?

Yes, it does!

nharrand avatar May 13 '24 09:05 nharrand

Great, thanks for your input!

hersle avatar May 13 '24 09:05 hersle