<div dir="ltr"><p dir="ltr">Hello,</p>
<p dir="ltr">Just checking in to see if the community has a strong opinions on this topic.</p><p>Thanks,<br>Srivatsan</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 18, 2016 8:56 PM, "Srivatsan Iyer" <<a href="mailto:supersaiyanmode.rox@gmail.com" target="_blank">supersaiyanmode.rox@gmail.com</a><wbr>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, 18 Aug 2016 at 17:23 Aleix Pol <<a href="mailto:aleixpol@kde.org" target="_blank">aleixpol@kde.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Aug 19, 2016 at 1:58 AM, Srivatsan Iyer<br>
<<a href="mailto:supersaiyanmode.rox@gmail.com" target="_blank">supersaiyanmode.rox@gmail.com</a><wbr>> wrote:<br>
> Hi Aleix,<br>
><br>
> Unlock/lock is just a sample. The main idea is to embed python interpreter<br>
> with custom modules, so that anyone can easily write their own plugins. All<br>
> it would take is a few lines of python as opposed to a shared object.<br>
> Further, the Android activity corresponding to this plugin can potentially<br>
> be made generic enough to dynamically show elements corresponding to each<br>
> plugin. Currently the ListView gets automatically populated with plugins<br>
> information (specifically ones that have expressed an intent to listen to<br>
> "MAIN" eventĀ  -- akin to android.intent.action.MAIN).<br>
><br>
> May be providing a different example might help what I'm trying to explain.<br>
> Assuming the android device is able to listen to an event "battery fully<br>
> charged", any one can quickly write up a script that listens to that event,<br>
> and sends a desktop notification to unplug the charger. All you'd need to do<br>
> is drop the script (and metadata.json) in a specific folder. That's it. No<br>
> change on the android side at all (assumption of being able to listen to the<br>
> event still holds but this is just a one time business).<br>
><br>
> Srivatsan<br>
><br>
><br>
><br>
> On Thu, 18 Aug 2016 at 16:24 Aleix Pol <<a href="mailto:aleixpol@kde.org" target="_blank">aleixpol@kde.org</a>> wrote:<br>
>><br>
>> On Tue, Aug 16, 2016 at 10:50 AM, Srivatsan Iyer<br>
>> <<a href="mailto:supersaiyanmode.rox@gmail.com" target="_blank">supersaiyanmode.rox@gmail.com</a><wbr>> wrote:<br>
>> > Hello,<br>
>> ><br>
>> > I have been writing a kdeconnectd plugin that embeds a python<br>
>> > interpreter<br>
>> > allowing scripts to be written to extend functionality. These scripts<br>
>> > can<br>
>> > respond to android system events (such as phone unlock) or be manually<br>
>> > invoked via the Android App.<br>
>> ><br>
>> > There's a bare-bones implementation in my Github repository (links<br>
>> > below),<br>
>> > that is able to load two scripts: one that locks the KDE session from<br>
>> > the<br>
>> > android device, and the other that listens to android device unlock<br>
>> > event<br>
>> > and also unlocks KDE. (Link to a gif below).<br>
>> ><br>
>> > I have a few questions and I'd really appreciate you guys' response.<br>
>> ><br>
>> > 1) Although I do not see it within the repository here:<br>
>> > <a href="http://github.com/KDE/kdeconnect-kde" rel="noreferrer" target="_blank">github.com/KDE/kdeconnect-kde</a>, is this something someone else is working<br>
>> > on<br>
>> > locally? If so, I'd love to collaborate and contribute.<br>
>> ><br>
>> > 2) This point is valid provided the plugin sounds like a good idea. The<br>
>> > current implementation is really not that robust and has a lot of rough<br>
>> > edges. I have about 10-15 non-trivial todos before I can even think of a<br>
>> > PR.<br>
>> > Eventually, this plugin will expose basic desktop functionalities of KDE<br>
>> > (like notifications), and the android device (like other calls, texts,<br>
>> > or<br>
>> > notification access). Additionally I am also thinking about virtualenvs<br>
>> > and<br>
>> > ability to install 3rd party packages for these python scripts. This,<br>
>> > surely, is too ambitious for me. But in the short term, I feel I am done<br>
>> > with a basic skeleton and would like others taking a look. What would be<br>
>> > the<br>
>> > best process? I can surely submit a review at <a href="http://git.reviewboard.kde.org" rel="noreferrer" target="_blank">git.reviewboard.kde.org</a>,<br>
>> > but<br>
>> > it might take me a few months to fully finish this and submit for<br>
>> > review. Or<br>
>> > is it okay submit work that is (somewhat) complete but not ready to be<br>
>> > merged? I am looking for something that allows for a lot of going back<br>
>> > and<br>
>> > forth.<br>
>> ><br>
>> > Links:<br>
>> > - kdeconnect-kde diff:<br>
>> ><br>
>> > <a href="https://github.com/KDE/kdeconnect-kde/compare/master...supersaiyanmode:master" rel="noreferrer" target="_blank">https://github.com/KDE/kdeconn<wbr>ect-kde/compare/master...super<wbr>saiyanmode:master</a><br>
>> > - kdeconnect-android diff:<br>
>> ><br>
>> > <a href="https://github.com/KDE/kdeconnect-android/compare/master...supersaiyanmode:master" rel="noreferrer" target="_blank">https://github.com/KDE/kdeconn<wbr>ect-android/compare/master...s<wbr>upersaiyanmode:master</a><br>
>> > - Remote KDE Unlock demo:<br>
>> > <a href="https://twitter.com/supersaiyan_9/status/765440342023745536" rel="noreferrer" target="_blank">https://twitter.com/supersaiya<wbr>n_9/status/765440342023745536</a><br>
>> ><br>
>> > Thanks,<br>
>> > Srivatsan<br>
>> > --<br>
>> ><br>
>> > Srivatsan Iyer<br>
>><br>
>> There's already a plugin for un/locking in plugins/lockdevice, we<br>
>> didn't enable it by default because we don't have UI for Android. I'd<br>
>> suggest making your Android patch work with this one, so it's not<br>
>> duplicated in the KDE side.<br>
>><br>
>> HTH,<br>
>> Aleix<br>
><br>
> --<br>
><br>
> Srivatsan Iyer<br>
<br>
Hi,<br>
Sorry, I didn't understand you.<br>
<br>
Personally, I'm not interested in having plugins in Python at this<br>
point, and it would also be a rather big dependency to add. I'd be<br>
happy to know others' opinions.<br>
<br>
Aleix<br></blockquote><div><br></div><div>Hi, I totally understand your hesitation to add this dependency. I'd probably hesitate too. However:</div><div><br></div><div>1) We can put this plugin under experimental section, and continue development until it matures.</div><div><br></div><div>2) I always wanted to extend KDEConnect with additional features. Most of the features are tiny but writing independent plugins would be an overkill. Also, the lazy in me could never find time to sit down to read, understand, and extend C++/Java code. This would be one solution -- Write up a few lines of script, drop in a specific folder, and things would just work. No need of recompiling server or android. It would just work :)</div><div><br></div><div><span style="line-height:1.5">3) Once this matures, I imagine we can have a little community of scripts that people might be able to use. (I might be too ambitious but maybe KDE's "Get Hot New Stuff" :) )</span><br></div><div><span style="line-height:1.5"><br></span></div><div>-Srivatsan</div></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><p dir="ltr">Srivatsan Iyer</p>
</div></blockquote></div></div>
</div>