Active Topics

 



Notices


Reply
Thread Tools
Posts: 482 | Thanked: 550 times | Joined on Oct 2010
#271
Originally Posted by NightShift79 View Post
Hi.

Could you imagine an option to switch clock styles individually to the desktop?
- Like on Desktop1 you got the binary clock and on desktop2 you got the decimal clock etc...
I suppose the first step would be to find out which desktop is currently active; the rest would be (relatively) easy.

Anyone know how this can be done in Python?
 

The Following User Says Thank You to skykooler For This Useful Post:
Posts: 21 | Thanked: 9 times | Joined on Apr 2010
#272
Originally Posted by Mentalist Traceur View Post
Feasible... If you'd like I'll make that clock style for you. (I haven't looked at binary clock code lately, but I'm sure it's not hard.)
I'd appreciate that, The BCD clock has it by the 12-hour mode, and personally I'd use it with binary.

I think instead of removing the 5th dot it may be used as a PM indicator but shifted like this:

o _ o o o o
o o o o o o

Dunno if that or a simple 4-dot would be better/easier
 

The Following User Says Thank You to enceladus47 For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#273
Originally Posted by skykooler View Post
I suppose the first step would be to find out which desktop is currently active; the rest would be (relatively) easy.

Anyone know how this can be done in Python?
Well, I just pulled up the Active Desktop Status Icon source code (can be found here: http://maemo.org/packages/package_in...esktop-sp/0.1/ ) and it looks like the value of the currently displayed desktop is stored in the GConf database. I'm not a GConf-savvy person, but I'm pretty sure you guys can figure it out from the code.

Meanwhile, I just finished installing Metasploit on my N900 (I was ultimately waiting for the injection drivers, because I figured if the N900 can't get on a pen-test WiFi network, it doesn't need to have Metasploit on board), and I've also stumbled upon another place in the filesystem where the traffic data may be stored for all interfaces: /sys/class... not sure, but point is, I am having a resurgence in time/motivation to finish up my clock style, given that I tend to bounce between projects/contributions/things-I-want-to-do.
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#274
Originally Posted by enceladus47 View Post
I'd appreciate that, The BCD clock has it by the 12-hour mode, and personally I'd use it with binary.

I think instead of removing the 5th dot it may be used as a PM indicator but shifted like this:

o _ o o o o
o o o o o o

Dunno if that or a simple 4-dot would be better/easier
K. Give me a few hours to get off my *** and stop being lazy, and I'll do it.
 

The Following User Says Thank You to Mentalist Traceur For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#275
Binary4DotClock.py.txt
enceladus47: Here you go.

I haven't tested it in the PMs yet, so let me know if it randomly flips and stops working whenever you're in 12-hour mode and the time is something-PM. It hit the PMs here about an hour ago. It's working just fine at showing it. (This is using the extra dot over on the side as a PM/AM indicator in 12-hour mode. It was indeed a bit extra coding, but not much. It just took a bit more to figure out because Binary Clock glitched whenever I put cairo stuff in directly in the draw_clock part, so I ended up using the draw_bits_horizontally function Wonko built into that clock style. I had the basic get-rid-of-extra-dot-part done last night, but I figured you'd like it more if I added in your AM/PM indicator idea.) Procedure same as before. Copy/rename the file to /opt/maemo/usr/lib/advanced-clock-plugin/clocks/Binary4DotClock.py, removing the ".txt" bit. (/usr/lib/advanced-clock-plugin/clocks/ works too, since it symlinks to the above anyway.) Oh, and then restart hildon-status-menu, or reboot, because otherwise the advanced clock won't reload itself correctly.

Wonko, feel free to include this in your future packagings of the Adv. Clock, if you like it.

Last edited by Mentalist Traceur; 2011-01-14 at 18:01. Reason: Forgot to put in the 'restart hildon-status-menu' reminder.
 
Posts: 21 | Thanked: 9 times | Joined on Apr 2010
#276
Thanks a lot for this effort, it looks just as expected but there's something wrong with time

The indicator is right but the other four dots act as if it was the 24-hours mood, for example for 1 pm it shows '1 1011' instead of '1 0001', 9 pm shows '1 0101' instead of '1 1001', 12 am shows '0 0000' instead of '0 1100'
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#277
Originally Posted by enceladus47 View Post
Thanks a lot for this effort, it looks just as expected but there's something wrong with time

The indicator is right but the other four dots act as if it was the 24-hours mood, for example for 1 pm it shows '1 1011' instead of '1 0001', 9 pm shows '1 0101' instead of '1 1001', 12 am shows '0 0000' instead of '0 1100'
Huh... You're right. That's odd, because I didn't mess with the code that determines how to show those dots at all...

*Sigh* Time to look over the code some more. Deleting the one extra dot prob'ly screwed things up somehow.

- Edit -

Actually, I just noticed my normal Binary Clock does the same exact thing.

Do you mind switching to the default binary clock, and seeing what it shows for you?

- Edit 2 -

Yeah, I'm starting to think the Binary Clock was never meant to have a 12-hour mode, presumably because by nature, Binary clocks typically don't do 12 hour modes. They just show current time, in binary - which never necessitated using a 12-hour mode to begin with.

Last edited by Mentalist Traceur; 2011-01-14 at 19:50. Reason: Noticed default Binary Clock behavior.
 
Posts: 21 | Thanked: 9 times | Joined on Apr 2010
#278
The normal binary clock works normally for me
 

The Following User Says Thank You to enceladus47 For This Useful Post:
Posts: 21 | Thanked: 9 times | Joined on Apr 2010
#279
dunno, i've seen it before and would've liked to use it that way.
I think I could edit the code which determine the four dots but I can't figure out which part that is, if you could point me to it I could use your design and edit it.
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#280
No need, I got it working. Code's a bit messy. If you still want me to explain it, I can take the time to type up an explanation, I can.

Question: Can you post your normal BinaryClock.py? I think mine either got screwed up or didn't get updated at some point. Also, what are all your Advanced Clock settings?

Anyway, here's the working-12hr-mode version. (At least working on my N900. If it doesn't for you I don't know what to make of it.)

Binary4DotClock.py.txt
Hopefully that works.
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 14:46.