Re: Possible to automatically resume "normal" mode on specific days at specific times?
Joe Wells <[email protected]> Tue, 05 Jun 2012 23:36:17 +0100
| Newsgroups | gmane.comp.misc.workrave.user |
|---|---|
| Message-ID | <[email protected]> |
[email protected] writes: > Thanks Joe. > > Yeah, I want to set up a task in Windows' task scheduler to do something like > what you're describing. I just need to figure out the method of talking to the > workrave instance in Windows 7. > > I can't find "operation-mode" or "operation_mode" in the windows registry. > I'll keep looking into the registry. Better to look through the Workrave source code to see if it has anything connected. Or check if you can run (or are already running) D-Bus on Windows. -- Joe > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > From: Joe Wells <[email protected]> > To: [email protected] > Cc: End-user mailing list <[email protected]> > Sent: Tuesday, {June 5, 2012}[2012-06-05] 9:42 AM > Subject: Re: [Workrave-user] Possible to automatically resume "normal" mode on > specific days at specific times? > > [email protected] writes: > >> I want to have workrave automatically switch to "normal" mode on >> weekdays at 9 AM. Is there a way to schedule this or a way to >> communicate directly with the Workrave instance via port or through >> a CLI? > > On Linux you can communicate most of these things via Gconf. For > example, to change the time between micro-breaks to 5 minutes, you can > do this: > > gconftool-2 --set --type=int /apps/workrave/timers/micro_pause/limit 300 > > In principle, changing to normal mode should be this: > > gconftool-2 --set --type=int /apps/workrave/gui/operation-mode 0 > > In fact, changes to this particular Gconf setting (i.e., > /apps/workrave/gui/operation-mode) are not noticed by Workrave 1.8.5, > which I am still running (although Workrave does update the setting > when you change the mode via the mouse menu interface, so you can use > gconftool-2 to view the setting). I think this bug has been fixed. > > There is also a DBUS interface which works on Linux (maybe also > Windows?). I've never used the DBUS interface to Workrave except for > testing, but in principle this is supposed to work to change to normal > mode: > > dbus-send --print-reply --type=method_call --dest=org.workrave.Workrave /org/ > workrave/Workrave org.workrave.WorkraveInterface.SetOperationMode > string:'normal' > > I have no idea if there is any equivalent via the Windows registry. > > And of course you can use standard techniques to run scripts at > specific times to invoke these commands. So what you want should be > doable. Personally, I have a cron job that runs every 2 minutes and > checks various Workrave issues. For example, sometimes for work > (e.g., while demonstrating something) I need to temporarily put > Workrave in suspended mode, but then I can easily forget to return it > to normal mode later, so my script checks if I have left Workrave in > suspended mode for too long. > > I hope this helps. > > -- > With my best regards, > > Joe Wells ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Workrave-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/workrave-user