miniXcal - a little companion for the clock

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
lior2b
Posts: 97
Joined: Sat 04 Feb 2006, 12:15
Location: The Holy Land
Contact:

miniXcal - a little companion for the clock

#1 Post 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}
Last edited by lior2b on Sun 30 Apr 2006, 11:45, edited 1 time in total.
[color=#4682B4]Lior Tubi[/color]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

nifty :)

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

User avatar
lior2b
Posts: 97
Joined: Sat 04 Feb 2006, 12:15
Location: The Holy Land
Contact:

#3 Post 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.
Attachments
miniXcal.tar.gz
miniXcal - a little calendar program
* UPDATED *
Binary + Source
(14.87 KiB) Downloaded 1549 times
[color=#4682B4]Lior Tubi[/color]

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#4 Post 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.
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

User avatar
lior2b
Posts: 97
Joined: Sat 04 Feb 2006, 12:15
Location: The Holy Land
Contact:

#5 Post 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...
[color=#4682B4]Lior Tubi[/color]

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#6 Post 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
Bring on the locusts ...

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#7 Post 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>
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

User avatar
lior2b
Posts: 97
Joined: Sat 04 Feb 2006, 12:15
Location: The Holy Land
Contact:

#8 Post by lior2b »

:D
Instead of:

Code: Select all

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

Code: Select all

<Clock>miniXcal</Clock>
[color=#4682B4]Lior Tubi[/color]

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#9 Post 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
Bring on the locusts ...

User avatar
lior2b
Posts: 97
Joined: Sat 04 Feb 2006, 12:15
Location: The Holy Land
Contact:

#10 Post by lior2b »

Nathan, I was quicker :P
Thanks for including this, 1.0.9 will turn out to be the best Puppy ever!!
[color=#4682B4]Lior Tubi[/color]

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#11 Post by Nathan F »

Nathan, I was quicker Razz
Apparently so. Let's race again when I'm not so tired :wink:

Nathan
Bring on the locusts ...

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#12 Post 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
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#13 Post 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?

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#14 Post by BarryK »

yeah, an "ical" button in minixcal would be nice!
Or, integrate ical somehow.

User avatar
lior2b
Posts: 97
Joined: Sat 04 Feb 2006, 12:15
Location: The Holy Land
Contact:

#15 Post 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 :)
Attachments
minixcal-1.1.tar.gz
minixcal 1.1
Binary + Source
(17.51 KiB) Downloaded 1336 times
[color=#4682B4]Lior Tubi[/color]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#16 Post 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: )

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#17 Post by Nathan F »

I've downloaded it and will get it into 109 final. Looks great, thanks.

Nathan
Bring on the locusts ...

User avatar
Weeble
Posts: 36
Joined: Mon 27 Jun 2005, 16:31
Location: Fruitland Park, FL, USA
Contact:

I Tried It, I Liked It!

#18 Post 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
I'm "Weeble" from Groklaw. Hi, y'all!

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#19 Post 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.

Post Reply