Page 1 of 1

miniXcal - a little companion for the clock

Posted: Sun 30 Apr 2006, 04:03
by lior2b
I wrote a little program (7KB), which I call miniXcal that will satisfy the immediate need for a simple calendar. Through .jwmrc you can set a program to be executed when the clock is being clicked, this is where miniXcal fits. miniXcal will be shown at the current mouse location, on top of all other windows, and will disappear when the user clicks somewhere out of the calendar. Very simple and comfortable IMHO. I really hope that you'll find it useful, and maybe include this in the next Puppy!

I'm attaching the source file plus a binary, installation instructions:
1) Download and untar the file:

Code: Select all

tar -xvzf miniXcal.tar.gz
2) Copy miniXcal binary to somewhere useful:

Code: Select all

cp miniXcal/miniXcal /usr/bin/miniXcal
3) Change .jwmrc:

Code: Select all

From:
<Clock>xclock</Clock>
To:
<Clock>miniXcal</Clock>
4) restart JWM.

What do you think?

{new version below}

Posted: Sun 30 Apr 2006, 04:15
by MU
nifty :)

the deactivation takes some clicks and seconds in Enlightenment, you might add a right-click to exit?
Mark

Posted: Sun 30 Apr 2006, 11:44
by lior2b
Thanks :) I'm attaching a little update: miniXcal now exits on Enter, Escape or Space key press and on right mouse click press.

Posted: Sun 30 Apr 2006, 13:41
by pakt
Will this work with older versions of JWM? I'm running Puppy 1.07 and clicking on the clock does not start miniXcal, although it does run nicely from a console. I made the modification in .jwmrc and restarted JWM. I even tried restarting X, but that didn't help either.

Posted: Sun 30 Apr 2006, 13:50
by lior2b
JWM has the option to run a program when the clock is clicked since v0.17. I'm pretty sure Puppy 1.0.7 has a greater version, hence it should work. Two things I can think of, try typing: "which miniXcal" at console, if it doesn't output anything it means you didn't copy miniXcal to the right place (like /usr/bin). Second, try "jwm -p" at console, to check the .jwmrc for errors. Can't think of another idea...

Posted: Sun 30 Apr 2006, 14:00
by Nathan F
Hey, I just gave it a try. Well worth the 7KB, and it adds a function jwm has been missing for a long time. Will push to put this into 109, thanks Lior.

Nathan

Posted: Sun 30 Apr 2006, 14:03
by pakt
Here is some feedback:

Code: Select all

# which miniXcal
/usr/bin/miniXcal

# jwm -p
JWM: warning: configuration error: invalid Clock option: Clock
I must have done something wrong in .jwmrc. Here are relevant lines:

Code: Select all

	<Clock>
		<Clock>miniXcal</Clock>
	</Clock>

Posted: Sun 30 Apr 2006, 14:08
by lior2b
:D
Instead of:

Code: Select all

<Clock>
   <Clock>miniXcal</Clock>
</Clock>
write only:

Code: Select all

<Clock>miniXcal</Clock>

Posted: Sun 30 Apr 2006, 14:09
by Nathan F
Yes, that is a mistake. You basically have two sets of <Clock> tags. So delete one set.

Code: Select all

<Clock>miniXcal</Clock> 
instead of

Code: Select all

   <Clock>
      <Clock>miniXcal</Clock>
   </Clock>
Nathan

Posted: Sun 30 Apr 2006, 14:13
by lior2b
Nathan, I was quicker :P
Thanks for including this, 1.0.9 will turn out to be the best Puppy ever!!

Posted: Sun 30 Apr 2006, 14:15
by Nathan F
Nathan, I was quicker Razz
Apparently so. Let's race again when I'm not so tired :wink:

Nathan

Posted: Sun 30 Apr 2006, 14:16
by pakt
Just found the problem. Nathan, you were on the right track. The lines should read:

Code: Select all

	<Clock>
		<Program>miniXcal</Program>
	</Clock>
I had experimented some time back, trying to get 24H time and I must have screwed up the lines then.

Now miniXcal works. Very nice Lior! Thanks Lior & Nathan for your help :)

Paul

Posted: Mon 01 May 2006, 00:27
by GuestToo
i wrote a simple script for Icewm that pops up the date and time when the clock is clicked, and the date and time can be copied to the clipboard ... i also put buttons on the window to run ical or xclock ... would it be a useful idea to have miniXcal automatically copy a date/time string to the clipboard?

Posted: Mon 01 May 2006, 01:26
by BarryK
yeah, an "ical" button in minixcal would be nice!
Or, integrate ical somehow.

Posted: Tue 09 May 2006, 12:30
by lior2b
minixcal 1.1
Changelog:
(*) Renamed to minixcal, the capital X was too annoying...
(*) Added week numbers
(*) Enhanced program positioning
(*) Added a thin black border
(*) Command line arguments -v --version -h --help display version and authour information
(*) If ical is installed, minixcal displays a button to execute Ical

Notes:
(*) The executable weights now 8KB :)
(*) G2, gtk1 is really handicapped when it comes to clipboard handling. The clipboard is only saved while the program is working, but hence minixcal exits on mouse leave it is not possible to keep the date (any conventional suggestion would be great!)... thanks for the ideas anyways :)
(*) I looked into binding Ical and minixcal a little bit more, but I won't from two reasons: 1) Ical's output is a mess 2) minixcal is not a calendar program, this is why we feature Ical :)

Posted: Tue 09 May 2006, 21:38
by BarryK
lior2b wrote:minixcal 1.1
Changelog:
(*) Renamed to minixcal, the capital X was too annoying...
I'm glad you said that! :lol:
I would encourage all Puppy authors to use lower-case letters for executables.
Upper case in directory names is fine, also "internal" executables
-- just the main executable should be lowercase.

My reasons for this are that I "just like it", it's consistent with most everyone
else, and it prevents any potential conflict with Puppy's keywords (which should
always have at least one capital letter).
(this is a hint to MU :wink: )

Posted: Wed 10 May 2006, 17:20
by Nathan F
I've downloaded it and will get it into 109 final. Looks great, thanks.

Nathan

I Tried It, I Liked It!

Posted: Thu 11 May 2006, 21:19
by Weeble
Now this is one nifty program! :) I didn't even get to the post about 1.1 before I installed it (I installed the first revision) and I like it very much. I've had a hard time getting the yellow date/time banner to come up, and have had to launch the calendar program a lot. This is great! I've installed 1.1 now and look forward to rebooting and using it. Thanks! :P

Posted: Wed 21 Dec 2011, 18:36
by Argolance
Hello,
I noticed something which is not important but should be solved though: In French, months containing é (décembre, février) don't appear in the popup (just d :shock: , f :shock: )
Invalid UTF-8 string passed to pango_layout_set_text()
Is this due to minixcal or is there something else somewhere which could be properly set?

Thank you a lot for your attention.