maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [User feedback request] Shepherd (https://talk.maemo.org/showthread.php?t=31524)

qole 2009-09-11 22:36

Re: [User feedback request] Shepherd
 
Canola is a made-up word that was formed from words meaning "Canadian Oil". Why? Well, "rape seed oil" just doesn't have a good sound for marketing.

Why someone chose the word for rape seed oil for their media player is less clear, however.

edgar2 2009-09-11 22:44

Re: [User feedback request] Shepherd
 
feature idea: location and/or time defining what profile gets activated (normal, silent, OUTDOORS, meeting, etc).

i can think of lots of places where i'd love to have my (soon-to-be-in-my-hands) n900 automatically switch to silent :)

Saturn 2009-09-13 23:16

Re: [User feedback request] Shepherd
 
Hi, filled an enhancement request in bugzilla for the the automatic updates thing discussed earlier in the thread.

If you feel like, please give it a vote.

javispedro 2009-09-13 23:26

Re: [User feedback request] Shepherd
 
Have you seen GlovePIE?

I once envisioned a language based on GlovePIE's "declarative"/"eternal while true loop" idea managing from input mapping to a load of events. The syntax was kinda like:

Code:

on (Script.started) {
    $host = Network.Host("192.168.0.2");
}

on ($host.down) {
  System.Reboot();
}

on (Keyboard.Ctrl.Pressed && Keyboard.A.Pressed) {
    Keyboard.B.Pressed = true;
}

Script, Keyboard, System, etc. all pluggable modules.

Unfortunately I only got to the parser before wandering off and pushing it to the bottom of my TODO pile, but if you're looking for ideas.... (even though this one is a geekish). You can use a Python VM too, or just the GUI option and be done with it, but I usually find them lacking unless they're really, really complex, in which case it usually defeats the purpose.

iKneaDough 2009-09-14 00:07

Re: [User feedback request] Shepherd
 
Quote:

Originally Posted by javispedro (Post 326451)
You can use a Python VM too, or just the GUI option and be done with it, but I usually find them lacking unless they're really, really complex, in which case it usually defeats the purpose.

It can be made a hybrid as well, meaning have a nice GUI with some simple tasks preloaded which the user can enable or disable,or add a simple task, and then have an advanced option (or config file), which could get much more complex and granular.

jolouis 2009-09-14 12:58

Re: [User feedback request] Shepherd
 
For the automatic update stuff... This is handled by AlarmD, so it's actually rediculously easy to disable/enable; just remove the event from the alarmD queue, and in its place add a new event that will check against the type of connectivity and only run the updater if wifi is active. Really has nothing to do with shepherd at all, unless you wanted to use shepherd to set a nice flag in gconf/temp file somewhere to indicate when you were on wifi vs anything else?...

i.e. From the alarmD queue right now (/var/lib/alarmd/alarm_queue.xml):
Code:

  <object type="AlarmdEventRecurring">
    <parameter name="action" type="object">
      <object type="AlarmdActionExec">
        <parameter name="flags" type="int">193</parameter>
        <parameter name="title" type="string"/>
        <parameter name="message" type="string"/>
        <parameter name="sound" type="string"/>
        <parameter name="icon" type="string"/>
        <parameter name="path" type="string">/usr/bin/hildon-update-notifier</parameter>
      </object>
    </parameter>
    <parameter name="time" type="int64">1217617165</parameter>
    <parameter name="snooze_interval" type="uint">0</parameter>
    <parameter name="snooze" type="uint">0</parameter>
    <parameter name="cookie" type="long">1217444365</parameter>
    <parameter name="recurr_interval" type="uint">1440</parameter>
    <parameter name="recurr_count" type="int">-1</parameter>
    <parameter name="real_time" type="uint64">1217617165</parameter>
  </object>

So just change the Path entry from "/usr/bin/hildon-update-notifier" to your own custom script that checks whether wifi is active, and only runs accordingly. You'll also have to change the entry later on that actually performs update checks, which is a little further down:

Code:

  <object type="AlarmdEventRecurring">
    <parameter name="action" type="object">
      <object type="AlarmdActionDbus">
        <parameter name="flags" type="int">193</parameter>
        <parameter name="title" type="string"/>
        <parameter name="message" type="string"/>
        <parameter name="sound" type="string"/>
        <parameter name="icon" type="string"/>
        <parameter name="interface" type="string">com.nokia.hildon_update_notifier</parameter>
        <parameter name="service" type="string">com.nokia.hildon_update_notifier</parameter>
        <parameter name="path" type="string">/com/nokia/hildon_update_notifier</parameter>
        <parameter name="name" type="string">check_for_updates</parameter>
        <parameter name="arguments" type="value_array"/>
      </object>
    </parameter>
    <parameter name="time" type="int64">1252944740</parameter>
    <parameter name="snooze_interval" type="uint">0</parameter>
    <parameter name="snooze" type="uint">0</parameter>
    <parameter name="cookie" type="long">1252512740</parameter>
    <parameter name="recurr_interval" type="uint">1440</parameter>
    <parameter name="recurr_count" type="int">-1</parameter>
    <parameter name="real_time" type="uint64">1252944740</parameter>
  </object>

I make no guarantees that this will actually work, but should do... if somebody wants to try it and is having issues/etc or gets it to work then I suggest opening it in a new thread unless it's specifically associated with Shepherd itself as it seems a bit off topic (but still very useful info)

-Rob

attila77 2009-09-14 13:49

Re: [User feedback request] Shepherd
 
@javispedro: have not seen it, thanks for the tip, will take a look

@iKneaDough: it is already a two-component software. The 'daemon' part runs in the background and is controlled by config files. The WiP GUI part is just a front-end for user friendly editing these config files and signaling reload/start/stop to the daemon.

@jolouis: I agree shepherd is not necessary to change how you deal with updates. That said, the lure of using shepherd for such a task is to be able to *easily* combine the action with any vector provided - particular provider, location, etc.

allnameswereout 2009-09-14 17:05

Re: [User feedback request] Shepherd
 
Great idea! :)

attila77 2009-09-17 13:54

Re: [User feedback request] Shepherd
 
Just ran accross this headset thingie... You know where this is going (apart from the end of the already longish todo :) ) - make the headset button perform different tasks depending on shepherd parameters :)

nilchak 2009-09-17 19:15

Re: [User feedback request] Shepherd
 
Quote:

Originally Posted by Saturn (Post 325169)
Could also sent the last known GPS location. Adds also value which later can be used differently. e.g plot in a map your day out.

As long as you can shut it down in SPECIAL CASES ;)

http://geekandpoke.typepad.com/.a/6a...599062a970c-pi


All times are GMT. The time now is 17:49.

vBulletin® Version 3.8.8