Friday, January 1, 2010

Re: [BLUG] My KDExperience

2009/12/28 Steven Black <blacks@indiana.edu>:
> On Mon, Dec 28, 2009 at 09:07:07PM +0000, Mark Krenz wrote:
[snip]
>> Right now the desktop still feels a bit strange because I'm getting used
>> to things like having to press Ctrl+shift+n for a new terminal tab
>> instead of Ctrl+Shift+t.  But those are minor things that will pass.
>> We've definately come a long ways since the days of the FVWM window
>> manager, which could do pretty much anything you wanted, but you had to
>> modify a text file to do it and then reload FVWM.
>
> You can easily tweak the keymap in konsole. It is handy to (for
> instance) disable F1 for help if you find you accidentally press it when
> reaching for ESC.
>
> In fact, you can tweak the keys in pretty much any KDE application. I
> recently wanted to disable Alt-Left-Arrow in Firefox and, to my dismay,
> I found I couldn't change any of the key-mappings. I'm used to KDE
> allowing me to get things to work the way I want.

This is only because Firefox is a Windows application masquerading as
a gtk application in linux. The gnome hid says that users should be
able to change keyboard shortcuts for menu items by hovering the mouse
over the item (or at least, highlighting the item) and pressing the
new shortcut (backspace once clears). Try it in any hid-compliant gtk
program.

Disabling Alt-← in a real gtk browser (like galeon or epiphany) is as
easy as going into the "Go" or "View" or whatever menu, highlighting
"Back", and hitting backspace over it.

--
Jonathan

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] New Years Countdown timer

I modified this some to work with zsh and so that it doesn't crash if
you start it after the new year ;)

Also, I tried running it shortly before midnight last night, only to
find that my clock was a couple decaseconds (not deciseconds!) off. I
poked at ntpdate frantically, but my wife and parents were trying to
hand me a glass of champagne already, so I decided there were more
important things to spend the last few seconds of 2009 on ;)

In the spirit of keeping modifications to open source things out
there, I've included my [only slightly] modified version below. Maybe
there should be a clause for "Sorry, you missed it already" instead of
saying "Happy New Year!" when run at this point..

while V=$((`date +%s -d"2010-01-01"`-`date +%s`)); do \
if [[ $V -le 0 ]]; then \
toilet -f smmono12 --gay 'Happy New Year!'; \
break; \
else \
clear; \
toilet -f bigmono12 --gay $V; \
sleep 1; \
fi; \
done;

P.S. one of my later BASIC programs over a decade ago (a few years
before I really discovered linux) was a new year countdown timer. I
think I was preparing it for y2k, but I'm not sure anymore. It was
much longer and more complicated than this script, since I didn't know
about / have utilities like date and toilet, much less regexes (which
I did all by hand, ugh).

--
Jonathan

2009/12/30 Steven Black <blacks@indiana.edu>:
> I ran the script and found (1) I didn't have figlet installed, and (2) it
> suggested I install either figlet or toilet. I installed them both, but
> I think I like toilet's default letters better.
>
> In fact, here's my extended edition of the command (wrapped to be easy
> to read, but with line-continuation so you can copy/paste):
>
> while V=$((`date +%s -d"2010-01-01"`-`date +%s`)); do \
>    if [ $V == 0 ]; then \
>        toilet -f smmono12 --gay 'Happy New Year!'; \
>        break; \
>    else \
>        clear; \
>        toilet -f bigmono12 --gay $V; \
>        sleep 1; \
>    fi; \
> done
>
> I think the --gay toilet is just thing the any New Year's bash.
>
> Cheers,
> Steven Black
>
> On Wed, Dec 30, 2009 at 06:43:48PM +0000, Mark Krenz wrote:
>>
>>
>> This is what I just posted to the climagic account on twitter and
>> identi.ca:
>>
>> while V=$((`date +%s -d"2010-01-01"`-`date +%s`));do if [ $V == 0 ];then figlet 'Happy New Year!';break;else figlet $V;sleep 1;clear;fi;done
>>
>>  Of course I was limited to 140 characters.  Anyways, I thought some
>> people here might appreciate this little snippet.
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug