rantshoutwhisper

Subscribe to RSS feed

fuzzyclock Bash script - with no Python

,

Lots of posts abound with Python "fuzzy" clocks. I had one too, until I foolishly updated Python and lost it. I've been sat with an ill stomach for the day and so I thought I'd get my clock back...

Read more...

Submit a question about the arts cuts to @DerbyCC: http://www.facebook.com/event.php?eid=240668755993882
@opera Hoping DSK-304653 gets fixed some time very soon: but the snapshots are looking really good!

Diaspora* Opera sharing extension

, ,

NOTE: I tried submitting this to Extensions Repository, but an administrator there said it had a potential security risk. Unfortunately, that risk allows the extension to work with any pod. SO USE THIS AT YOUR OWN RISK.

Read more...

Another site overhaul

I just ravaged my my site. I added a whole heap of login things by hand too, so if you have time, let me know if they work for you!

WebIDs/FOAFS?

, ,

I've been doing quite a bit of reading about FOAFs, which lead me to read this:

http://www.w3.org/wiki/WebID

At first it didn't make sense to me BUT after a massive think I realised that it would enable someone to create their own profile on their own web-space, sharing as much or as little as they chose; and then they could use that profile to log in to sites. WebIDs use SSL certificates installed in the browser, so it seems to be secure too! Opera's interface for use certificates is really simple and MyOpera generates FOAF files for all its users, so it'd be great if MyOpera could make WebIDs for its users.

The community for FOAF is very friendly even though the documentation is heavy; so I've been able to do some small tinkering:

My WebID: http://webid.coreymwamba.co.uk/ This is an FOAF+SSL (FOSSL???) profile with an XSL stylesheet and the content handling done through PHP;

And a simple OpenID/WebID comments form: http://www.coreymwamba.co.uk/simplelogin/

Is anyone else using WebID?
Just made my first @opera extension - and now I can share links to my own website at the click of a button. smile

suspend by shutting the lid using Conky

, , , ...

Really short method this - but I suspect dirty. Although there seems to be a few suggested methods for getting "suspend to ram/disk" working using ACPI scripts, none of them has ever worked for me on openSUSE. But Conky can help.

My starting point was http://www.linux-archive.org/debian-user/311132-acpi-scripts-lenny-eeepc-701sd.html

The poster had written an example script to show that the lid switch was working called lidtest. I just modified the script to this:
#!/bin/sh
 grep -q closed /proc/acpi/button/lid/LID/state
 if [ $? = 0 ]
 then
 sudo /usr/sbin/pm-suspend
 fi


Put it in my local programs folder and made it executable (chmod +x lidtest).

Then in one of my Conky scripts (my clock):
update_interval 1.0
total_run_times 0
use_xft yes
xftfont FreeSans:bold:size=9
xftalpha 1.0
background no
own_window yes
own_window_transparent no
own_window_type dock
own_window_class time-power
double_buffer yes
minimum_size 90 2
TEXT
${execi 1 lidtest}${color FFFFFF}${font FreeSans:bold:size=14}${battery_percent BAT0}% ${font}${voffset -10}${goto 60}${alignr}${execi 60 fuzzyclock}${voffset 14}${goto 60}${font FreeSans:bold:size=8}${time %a %e %b} | ${color FFFFFF}${execi 150 fuzzyclock -f 3}


This works smile

The fuzzyclock is from http://linux.softpedia.com/get/Programming/Libraries/Fuzzy-Clock-2831.shtml - but I edited fuzzyclock.py for my own ends.

Probably worth mentioning cron at this point, too; as it would work too: but possibly only every minute?

A simple SVG player

, , ,

(UPDATED to reflect a small change in code - it's scalable; and a tiny rant about Opera breaking GStreamer.)

Read more...

Starting programs after Fluxbox in a way that works for me

, ,

Very short, this one. The recommended way to do this on the Fluxbox wiki has never worked for me; but it was a small fix.

You'll need pgrep which in openSUSE is part of the procps pacakge; but if you don't have it then you can do this - according to Wikipedia:
ps ax | grep '[p]rocessname' | awk '{print $1}'


Open up a text editor and open ~/.fluxbox/startup.

As an example, I'm going to use Skippy-XD which is an "expo" pager; and a terminal running htop.
Remove the line that says
exec fluxbox
and replace it with

fluxbox &
sleep 5 && skippy-xd &
xterm -e htop &
wait `pgrep fluxbox`


Save, log out and then log back in. This is what I get:

And you can see Skippy-XD and htop running under the Fluxbox startup file.

The sleep command needed to be bigger than 1 second in this case as I found that Skippy-XD wouldn't start otherwise.

Out of interest, Skippy-XD looks like this:

It's quite inflexible in some ways - it runs like a daemon and not a command; and has a configured key-press which takes up a key in Fluxbox - but I love expo paging, and this combined with xcompmgr gives me the only two things I really liked out of Compiz. All I need now is a script to tile two windows side-by-side and I'm a happy bunny. lol