Commit graph

89 commits

Author SHA1 Message Date
Ivailo Monev
4f2a08c1c9 generic: adjust to kdelibs changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-24 01:21:45 +02:00
Ivailo Monev
a79eb8a60b plasma: check if the sleep states are supported before adding match for them from powerdevil runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-21 01:46:48 +02:00
Ivailo Monev
d348b6f3a9 plasma: calculate the shortest powerdevil runner command from the untranslated strings too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-21 01:38:22 +02:00
Ivailo Monev
8792c478c4 plasma: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-21 01:36:25 +02:00
Ivailo Monev
1cad595824 generic: drop scripting support
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 08:14:30 +03:00
Ivailo Monev
9964857908 plasma: remove redundant Q_UNUSED() in RecentDocuments constructor
the args constant is passed to Plasma::AbstractRunner constructor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-02 21:33:23 +03:00
Ivailo Monev
8a198d991d plasma: recentdocuments runner optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-02 21:31:33 +03:00
Ivailo Monev
f3028cea20 plasma: remove unused applet keys
along with everything related to them

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-24 22:39:41 +03:00
Ivailo Monev
470b52d29c soliduiserver: implement mountpoint cleaner
lots of references have to be kept and passed around because once the
device is removed Solid::Device is just an UDI - anything else is
obtained dynamically and will return invalid results (even casts will
not work)

what the mountpoint cleaner does? when a device is removed without
being unmounted (e.g. USB storage) the program will call `unmount`
essentially making sure the device node and the mount point can be used
when the device is inserted again, no other project does that as far as
I am aware

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 11:02:45 +03:00
Ivailo Monev
dd4b27b579 soliduiserver: pass the Solid::Device object instead of the UDI to kExecuteAction()
so that it does not have to be re-constructed and removed device can be
passed to it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 09:00:42 +03:00
Ivailo Monev
e4366d3493 soliduiserver: implement feature to execute actions under certain conditions
can implement condition for when device changes occurs too but I have no
plans to use it for something, not yet that is. the remove condition can
(and probably will be) used to start kvkbd when there is no keyboard
plugged in altough that will require program to check when to do that

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 19:26:41 +03:00
Ivailo Monev
d477598c1d generic: device notification reimplementation
how does it look? something like this:
https://ibb.co/1zbDVpk

and because all the SolidUiServer bits are written by me now - copyright
it to me. the actions dialog was not operational btw (not for hotplug
events anyway).

the solidautoeject thing does not even make sense - when the eject
button is pressed it was calling Solid::OpticalDrive::eject() but if the
button is pressed the tray will eject anyway so what was it doing
actually?

solid-device-automounter can be replaced with solid actions but the
devices are mounted for solid actions anyway so dropping it

as for KCM for the solid actions - there can be none but to add features
such as non-interactive actions (e.g. launch the keyboard KCM when a
keyboard is plugged without poping dialog) or actions that do something
on device removal it has to be done anew

note that the action file for opening a file manager was named
"test-predicate-openinwindow" meaning it was a testing thing rather than
a finished thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 05:47:54 +03:00
Ivailo Monev
388eeea355 plasma: handle generic device search in solid runner
side note: the places runner may also add matches for the removable devices
because the places implementation handles them as bookmarks (the devices
in the dolphin places panel are bookmarks!
see kdelibs/kfile/kfileplacesitem.cpp)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 20:15:50 +03:00
Ivailo Monev
e0985f16cf plasma: filter duplicates and fix listing of optical drives in solid runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 19:30:22 +03:00
Ivailo Monev
ff2486c1bb plasma: translate solid runner comment to bg
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 05:32:10 +03:00
Ivailo Monev
ae6e4b8808 plasma: additional note about kSolidActionCommand() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 05:21:25 +03:00
Ivailo Monev
6ca60e84b5 plasma: reimplement the solid runner
using solid directly and not depending on soliduiserver for the actions,
now the hotplug and devicenotifications data engines aswell as the
devicenotifier applet can be reimplemented too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 03:35:02 +03:00
Ivailo Monev
271ffadb7b plasma: remove unused SolidRunner member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 22:39:01 +03:00
Ivailo Monev
f0427c4a8e plasma: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 22:36:09 +03:00
Ivailo Monev
17b5ffc92c plasma: deal with TODO related to sessions runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 20:51:02 +03:00
Ivailo Monev
cf6a2620c6 generic: remove dead and irrelevant links references
consider the mail references just as dead

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 15:44:43 +03:00
Ivailo Monev
9c2fb0b928 plasma: match the untranslated terms as fallback in runners
see the previous commit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 05:42:16 +03:00
Ivailo Monev
4275b7f7fc plasma: match the untranslated term as fallback from bookmarks runner
many plasma runner have this issue - when locale is changed to something
other than the default the trigger term has to be in translated form (e.g.
"отметки") because the original untranslated term is not matched (e.g.
"bookmarks") and it is as if the runners are not working

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 03:50:37 +03:00
Ivailo Monev
4adc6890bf plasma: bookmarks runner optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 03:37:25 +03:00
Ivailo Monev
c380602abf generic: adjust to KLocale changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:35:19 +03:00
Ivailo Monev
6b689bbdbc plasma: remove unused headers inclusions in qalculate_engine source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-12 12:49:46 +03:00
Ivailo Monev
7904557696 plasma: use the new Solid::PowerManagement::supportedSleepStatesChanged() signal
requires the following commit from kdelibs:
4900d6089280e0ff56876b85141dd51632e2209d

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-09 18:34:43 +03:00
Ivailo Monev
cb37a5683f generic: adjust to Solid::PowerManagement changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-09 18:11:38 +03:00
Ivailo Monev
52ff8f2eec plasma: remove unused variable in PowerDevilRunner::run()
the Solid::PowerManagement methods will activate the service

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-09 17:55:49 +03:00
Ivailo Monev
ce48bc0997 generic: preperations for kdelibs changes
automatically replaced via:
find -name CMakeLists.txt -exec sed -e 's|${KDE4_PLASMA_LIBS}|KDE4::plasma|g' -e 's|${KDE4_KIO_LIBS}|KDE4::kio|g' -e 's|${KDE4_SOLID_LIBS}|KDE4::solid|g' -e 's|${KDE4_KFILE_LIBS}|KDE4::kfile|g' -e 's|${KDE4_KDECORE_LIBS}|KDE4::kdecore|g' -e 's|${KDE4_KDEUI_LIBS}|KDE4::kdeui|g' -e 's|${KDE4_KCMUTILS_LIBS}|KDE4::kcmutils|g' -e 's|${KDE4_KDECLARATIVE_LIBS}|KDE4::kdeclarative|g' -e 's|${KDE4_KPTY_LIBS}|KDE4::kpty|g' -e 's|${KDE4_KEMAIL_LIBS}|KDE4::kemail|g' -e 's|${KDE4_KMEDIAPLAYER_LIBS}|KDE4::kmediaplayer|g' -e 's|${KDE4_KPARTS_LIBS}|KDE4::kparts|g' -e 's|${KDE4_KIDLETIME_LIBS}|KDE4::kidletime|g' -e 's|${KDE4_KTEXTEDITOR_LIBS}|KDE4::ktexteditor|g' -e 's|${KDE4_KPASSWDSTORE_LIBS}|KDE4::kpasswdstore|g' -e 's|${KDE4_KARCHIVE_LIBS}|KDE4::karchive|g' -e 's|${KDE4_KDNSSD_LIBS}|KDE4::kdnssd|g' -e 's|${KDE4_KNOTIFYCONFIG_LIBS}|KDE4::knotifyconfig|g' -e 's|${KDE4_KEXIV2_LIBS}|KDE4::kexiv2|g' -i {} +

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-17 23:27:11 +03:00
Ivailo Monev
91e09232ba plasma: use the new option/argument of KMimeType::favIconForUrl() in bookmarks runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-05 07:52:45 +03:00
Ivailo Monev
56e34026cb plasma: bookmarks runner optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-27 22:48:17 +02:00
Ivailo Monev
5ca5e4ea2d generic: adjust to KDirWatch changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 00:26:44 +02:00
Ivailo Monev
fcbec5f0cc generic: adjust to solid power manager changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-01 23:54:21 +02:00
Ivailo Monev
1fceba1bc8 plasma: remove KWin scripting support leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-12 15:04:32 +02:00
Ivailo Monev
936c69c827 generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-14 16:19:24 +03:00
Ivailo Monev
8798ee5053 plasma: proper fix for the inter-depency of kcm_krunner_kill and krunner_kill targets
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-27 19:32:12 +03:00
Ivailo Monev
1212fc79f7 generic: adjust to authorization changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-25 19:12:57 +03:00
Ivailo Monev
530bff97d3 plasma: catch exceptions in the calculator runner engine evaluation method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-22 08:25:41 +03:00
Ivailo Monev
d85452dfbf plasma: remove unused calculate runner engine methods
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-22 08:19:14 +03:00
Ivailo Monev
acfeaa88f1 plasma: simplify URLs transformation in bookmarks runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-22 07:24:25 +03:00
Ivailo Monev
252f091940 plasma: remove unused and private recentdocuments runner member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-22 07:15:36 +03:00
Ivailo Monev
fade0d9dc1 plasma: replace private powerdevil runner methods with their body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-20 07:40:36 +03:00
Ivailo Monev
0f61a0531f plasma: remove unused powerdevil runner method and variable
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-09-20 07:36:38 +03:00
Ivailo Monev
45ab1bd1f5 plasma: remove calculator runner easter egg
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-06 17:31:45 +03:00
Ivailo Monev
22fc324c28 plasma: catch unspecified exceptions in calculator runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-06 17:30:59 +03:00
Ivailo Monev
dc5bff5c7a plasma: fetch exchange rates from HTTPS URL
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-06 17:30:09 +03:00
Ivailo Monev
92d1e03122 generic: minor optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-01 17:45:25 +03:00
Ivailo Monev
d9ed85fec5 plasma: do not use ksysguard helper for killing processes and pop an error when the runner action fails
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-24 12:38:08 +03:00
Ivailo Monev
541043d2b4 plasma: optimize kill runner
attempting to cleanup every 50ms or create KSysGuard::Processes pointer
and suspend matching before the term length is checked is sub-optimal

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-16 12:15:48 +03:00