in my system, both korganizer and merkuro are installed along with kdepim-addons so that the + Add... button shows up in the digital clock.
unfortunately when i click on the + Add... button in the digital clock it takes me to korganizer calendar and not the merkuro calendar which i would prefer.
is there any way to set the default calendar app to merkuro so that the digital clock will call that program instead.
on 22.04 with backports i was able to install onlymerkuro (it was called kalendar then) and so the digital clock button defaulted to the that, but on 24.04 i apparently need to have BOTH installed in order to get the + Add... button in the digital clock… i tried multiple times to only have merkuro but it failed to work properly and had no access from the digital clock.
The check has been fixed by @carl but apparently not in the version you have installed.
What you could do is uninstall KOrganizer (since you don’t need it) and create a symlink (hardlink or copy) from the org.kde.merkuro.desktop file to its old name (or “impersonating” korganizer)
i can also confirm that altering the File Associations for “calendar” by removing or even demoting korganizer on the list will cause the + Add... button to disappear after re-logging… so that tracks with what you are saying, the button only appears when korganizer is found at the top of the list.
so if i’m understanding your workaround… i would:
note this path and file name: /usr/share/applications/org.kde.korganizer.desktop
uninstall korganizer (can i do purge and autoremove after?).
create a hardlink between the two like this: ln /usr/share/applications/org.kde.merkuro.calendar.desktop /usr/share/applications/org.kde.korganizer.desktop
and after a relog, the digital clock should find the fake version of korganizer and call up merkuro instead, right?
so that’s one option.
but you also mentioned a mod to /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/*
and since i already have a mod of my own to the DigitalClock.qml, i’m wondering how involved it would be to make this work from that end?
could you help walk me thru it?
just from a preliminary look at CalendarView.qml it seems there is a function called ApplicationIntegration.launchCalendar()
that is carried out when you click on the Add... button, and there is also a variable(?) called ApplicationIntegration.calendarInstalled
that is looked at just beforehand, and i don’t see where to tell it that merkuro is the calendar application installed.
the only statement at the top of the file that even mentions calendars is import org.kde.plasma.workspace.calendar 2.0 as PlasmaCalendar
Yes, that should be fine.
Those are just “house keeping” tasks for Apt, the remove has already taken the program out of the equation.
Yes, correct.
Or using org.kde.kalendar.desktop as the link target, i.e. linking the new name of Merkuro Calendar to its old one.
I think that needs to always be part of any solution.
There are two aspects to this:
detecting if a calendar application is available
launching that application
You can work around the first thing by modifying the QML code.
Instead of ApplicationIntegration.calendarInstalled you could simply write true, i.e. overriding detection and just letting the applet assume there is a calendar installed.
However, without the link step above, there was actually no successful detection, so the ApplicationIntegration.launchCalendar() call would not having anything to launch.
Whether it is possible to work around this in the applet’s QML depends on the Plasma QML API.
Generally there is no QML API to launch a process by name but if Plasma (or any other third party library) provides something like that then this could be used to replace the call and launch Merkuro instead.