[KDE Connect] Share text from CLI
KDE Connect is a project that aims to seamlessly integrate all your devices. It allows e.g. to send snippets of text to another device. kdeconnect-cli allows you to control various features from the command line and scripts. KDE Connect recently gained the ability to share text from the desktop, but this isn't avaibale from the cli yet.
The goal is to allow commands like "kdeconnect-cli"-d deviceid --share-text 'Foo bar baz'" to send that text to another device.
First it's necessary to build kdeconnect-kde (the desktop side components) from source. See https://community.kde.org/KDEConnect#Building_KDE_Connect_.28Desktop.29 for instructions. Whenever you changed something in the code and want to test it run "killall kdeconnectd" and then /usr/lib/libexec/kdeconnectd (this path may be different on your system).
For this task you need to modify cli/kdeconnect-cli.cpp Add a new option to the QCommandLineParser and add a suitble check to the others. It's easiest to copy and change an existing one.
For sharing the text create a ShareDbusInterface and call shareText().
When you are done upload your work on phabricator.kde.org (https://community.kde.org/Infrastructure/Phabricator)
If you have any questions please ask in #kdeconnect on Freenode or in our Telegram group (https://t.me/joinchat/BRUUN0bwMhNfn8FIejA-nw)
Happy coding!