Do test it, that will require building krunner and maybe plasma, that can take some time depending on your machine. kde-builder and the LLM can help.
And tell the LLM to keep consistent in code style and do your best to understand the code to spot shortcoming or logical issues. Ask the LLM for review.
It is not fine if reviewing is too hard, too verbose, too hard or convoluted, be mindful of reviewers that are humans, but do mistreat your LLM that’s a program.
And you can learn along the way, LLM can act as teachers.
Very cool of you to try and build it yourself! If I could share an idea: it would be nice if one could also set a timer to an absolute time, for example settings a timer to go off at 18:30, similar to how in the terminal one can do “shutdown 18:30”, which can be very useful instead of having to manually calculate how many minutes it would be until that time.
@dcog989 , I took a super quick look and IMHO it’d be easiest if you simply write a KRunner for KAlarm.
It can already be used through CLI, so that could be an easy hack:
Or you could use it via D-Bus:
Why I’m banging on about KAlarm is that of all of the above, it’s the most powerful, so even if for your use case you will need just one or two features, having a KRunner for KAlarm would allow a lot of other people to make use of the other features it has too.
I use Clock at the moment and the UI/UX for setting a timer is just too tedious - KAlarm looks worse!
Hence, why I want a very simple / quick timer function - and the best place for that is KRunner, which everyone has.
I’ve already made a good start on integrating with KRunner but this is not as easy as creating a standalone app / plugin, so I need to get it right before taking up dev time reviewing the PR.
Oh, KAlarm is an ancient swiss-army-knife-like tool, so the UI/UX is, for a lack of a better word, quite “power-user”-ish.
Sweet! I imagine it’s not as easy as just whipping up a quick timer app. I hope it’s worth it to you and I did not trick you into something that you’ll hate.
Here’s function and usage so far - feedback welcomed:
Time Syntax
Trigger words: remindme, rme (case-insensitive).
duration := HH:MM:SS | MM:SS | number [unit] | number
unit := "s" | "m" | "h"
Input
Meaning
5
5 minutes
.5
0.5 minutes = 30 s
20s
20 seconds
.5h
0.5 hours = 30 min
4h
4 hours
5:30
5 min 30 s
4:15:30
4 h 15 min 30 s
8 message
8 min, “message”
A bare number means minutes; fractional values (.5, .5m, .5h, …) are
accepted for both bare numbers and unit forms, rounded to whole seconds.
0 (or any non-positive) duration is invalid; the maximum is 99:59:59.
The message is everything after the duration and may contain spaces.
Usage
Action
Query
Create timer
rme 5, rme 8 msg
List active timers
rme list
Cancel by id
rme cancel 3
Cancel by message
rme cancel meeting
Usage / help
rme
Pressing Enter on a create match starts the timer; Enter on a listed timer (or
its “Cancel timer” action) cancels it.
“Cancel by message” matches the message exactly (case-sensitive), so a short
typo cannot nuke a large set of timers; use rme cancel <id> for a specific
timer.
Features
Create a timer from KRunner: rme 5, rme 8 pasta is ready!
List active timers: rme list
Cancel timers by id or message: rme cancel 3, rme cancel meeting
Desktop notification on expiry with snooze (+1 min)
Timers survive KRunner restarts (engine runs as a D-Bus helper process)