Notices


Reply
Thread Tools
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#21
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.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
edgar2's Avatar
Moderator | Posts: 199 | Thanked: 264 times | Joined on May 2009 @ turku, finland
#22
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
 

The Following 3 Users Say Thank You to edgar2 For This Useful Post:
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#23
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's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#24
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.
 

The Following 3 Users Say Thank You to javispedro For This Useful Post:
Posts: 81 | Thanked: 115 times | Joined on Jan 2008
#25
Originally Posted by javispedro View Post
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.
 

The Following User Says Thank You to iKneaDough For This Useful Post:
Posts: 631 | Thanked: 837 times | Joined on May 2007 @ Milton, Ontario, Canada
#26
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
 

The Following 2 Users Say Thank You to jolouis For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#27
@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.
 

The Following 2 Users Say Thank You to attila77 For This Useful Post:
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#28
Great idea!
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#29
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
 

The Following 2 Users Say Thank You to attila77 For This Useful Post:
Posts: 1,097 | Thanked: 650 times | Joined on Nov 2007
#30
Originally Posted by Saturn View Post
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

 

The Following User Says Thank You to nilchak For This Useful Post:
Reply

Tags
cron, power save, scheduling, shepherd

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:34.