KDE: “Run a command” on notification trigger
KDE had a feature a lot of people didn’t know about. You could run a command when a notification triggered. The feature wasn’t very well documented and nobody really blogged about it.
However with the release of KDE Plasma 6, the feature was removed. I learned about it by accident, as it is tracked by Bug #481069. I really need the feature and I re-implemented it in KDE Plasma 6. I will be available in KDE Plasma 6.1 and KDE Frameworks 6.1.
Text-to-Speech for calendar events
I’m using the “Run a command” feature for calendar events. Normally you get a popup notification. The popup notification is small and pop up where all of them are shown. When I’m concentrated and working on some code I simply miss them. If I play a game, I miss them.
The solution for me is to use a Text to Speech (TTS) Engine. I’ve setup speech-dispatcher with piper-tts on my system. When an a reminder triggers it says: “Andreas, you have an appointment in 10 minutes: Samba Meeting”.
You can find the python script I use here.
Endless possibilities
The opportunities for doing cool stuff with this are endless. Here are some ideas what else you could do:
- Start your meeting/conferencing application prior to the meeting
- Change the desktop activity before a meeting
- Lock the screen if a specific WiFi gets disconnected
If you have some nice idea or already used it in the past, leave a comment to let me know what else you can do.
Longtime KDE/Plasma user here (15+ years), I never knew about that feature but can already think of a couple of uses I’ll try out in the future. Thanks for doing the work and also thanks for bringing it to my (and probably others) attention!!
I’m very grateful you’ve re-implemented this, as it’s come in handy for my wifi network at home being dodgy (thankfully it’s fixed now but it used to randomly disconnect my laptop after too much network traffic) – I wrote a small script to disable and re-enable wifi (just using nmcli) and ran it every time the ‘Wifi adapter failed’ event occurred, which eased the annoyance massively!