Saturday 31 May 2014

Google Chrome Scrollbar Annoyance

For some reason, it was decided that web developers get to set the width of the Chrome scrollbar.

That's like allowing the petrol station to reset the width of my steering wheel.

I do not see a reason why users are expected to trawl the web for a fix and get lucky that the nth enigmatic recipe or extension works, or are advised to fiddle around with CSS code in order to restore a core functionality that should be set at OS level.

If I cannot trivially make it work, then lots of people won't either. 

*grump*

Ps.: How much user time is wasted on this 'feature'? 

Thursday 29 May 2014

A script for Exaile: bedtime-story.sh

As much as I like Exaile, it sadly lacks the option of turning a recording off after n minutes.

But, who needs a feature for the Exaile GUI when a script will suffice?

So, set your story up to play in the GUI, then use this:

bedtime-story.sh:

# turn the screen off
xset dpms force off

sleep $@ > /dev/null 2>&1

if [ $? = 1 ]
then
    # turn the screen on
    xset dpms force on
    echo "Fade out Exaile playback after a defined time, using the computer's volume control."
    echo ""
    echo "Usage: bedtime-story NUMBER[smh]..."
    echo ""
    echo "Each argument is a number followed by a unit."
    echo "The units are: s (seconds), m (minutes), h (hours)"
    echo "Example: bedtime-story 20m 10s"
    echo "The screen will be turned off, move the mouse or press a key to turn it back on."
fi

# grab current spot and volume, then gently fade and pause
c=$(exaile --current-position)
v=$(pactl list | grep Volume | cut -d ":" -f 3 | cut -d "%" -f 1 |\
 sed -n '1p' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
for((i=$v;i>=0;i--)) do
    sleep 1s
    pactl set-sink-volume 0 ${i}%
done
exaile --play-pause

# return volume to former setting
pactl set-sink-volume 0 ${v}%
echo "The current track was faded out beginning at $c."

Now I can go to sleep in style, whilst listening to the Internet's longest history podcasts. (in parts).

Wednesday 28 May 2014

Console Mio!

I figured out my concentration/reading problem -- the solution is to use lynx in the console.

I know, it's very retro, but, ever so easy on the eyes.

To set your Ubuntu console up, do this:

sudo dpkg-reconfigure console-setup

select: UTF8
next select: Combined - Latin; Slavic Cyrillic; Greek     
then select: VGA
Finally, select: 32x16 

For extra happiness, set your mouse up with gpm:  sudo apt-get install gpm

Now type alt-ctrl F1 [or F2-F6] and browse like it's 1980.

To get back to X, do alt-ctrl F7


Friday 23 May 2014

Fail to Plan --- Plan to Fail

'Fail to Plan -- Plan to Fail' is an itinerary planner to help you organise days when you have lots of little chores, or, it you want to see how long a process you have planned actually takes (Pi*thumb^procrastination).  It's quite useful for getting an idea of where your day goes.

The 'Help' drop down on the top far right has a tutorial to help you get started.

Some things to know about this little tool:

1) I didn't add a timer because I didn't want a nagplication.  Also, if you're in the garden, you won't hear your computer beep.

2) The 'now' button recalculates your day's plan to start 'now', if things take longer than planned.   I also find it useful to move a task to the end that I decide to do later.

3) Visually it's a bit of a jumble initially, but once you have practice (and worked through the tutorial)  it's actually not as bad as it looks.  I will try to fix this in later iterations.

4) The curry recipe is quite good -- it only looks that huge because I broke the process down into individual steps, it's actually not that difficult to cook ;-)

5)  I wrote this in raw javascript because it's hosted on Blogger for now, so, the drop down menus have been hand coded (I know... :) and... look accordingly.   I will try to move it to a saner space, where I have handy tools like JQuery available.

6) I'm no javascript/html champion, this started out as a little hack for fun and grew into something bigger than I estimated.  Advice/bug reports/collaborators are very welcome, mail me please. I have some more plans for this toy, for example, I'd like to be able to insert groups of tasks -- say, if you want to do the laundry, that consists of the tasks washing, hanging, drying & folding --- being able to drop those tasks in as a group would save a lot of typing.

7) Cookies in HTML 4 are limited in size, so don't go crazy with too many entries/files :-D

Enjoy!

Sunday 18 May 2014

A Wearable Sunset

Gazing lost into a sunset
it's so beautiful to see
and it's all embracing greatness
explains everything I feel
It' s just because I love you
it's because of luck and peace
the present is the present
from the future to the past


I especially love the nice touch of the person and the dog on the beach in the bottom right corner. The other thing I love about it is that it's millions of years old, then someone found it by cutting the stone in just the right place, someone else made a beautiful necklace out of it, and I have the privilege to admire and wear it.  

(What about code?  This blog is about code, not baubles!  Eh, ok.  I'm working on it.  Lots of news next week, so watch this space.)