Tiny Core Linux

Tiny Core Extensions => TCE News => TCE 1.x => Topic started by: curaga on February 28, 2009, 04:15:12 AM

Title: Xonclock - eyecandy for TC
Post by: curaga on February 28, 2009, 04:15:12 AM
Quote
Title:          xonclock.tce
Description:    Analog clock for X
Version:        0.0.9.2
Author:         Cyrill Gorcunov
Original-site:  http://xonclock.sourceforge.net
Copying-policy: GPL
Size:      208K
Extension_by:   Curaga
Comments:       Some eye candy for TC :)
Change-log:     
Current:        2009/02/28 Original

Only depends on graphics-libs-1, expat, and fontconfig.
Skinnable, and the looks can be otherwise tweaked too.
The size of the clock depends on the skin; see the second screenshot for a big one.

Screenshots of two skins:
(http://preview.shareapic.net/preview4/014985224.png) (http://www.shareapic.net/content.php?id=14985224&owner=laxy)

(http://preview.shareapic.net/preview4/014985228.png) (http://www.shareapic.net/content.php?id=14985228&owner=laxy)   
Title: Re: Xonclock - eyecandy for TC
Post by: jpeters on February 28, 2009, 02:47:24 PM
Nice, but needs an "xoffclock".  I guess there's no way to place on top layer. 

edit: BTW/ This is an example of where 'screen' comes in handy, running the process from a previous instance of the terminal window.. with the ability to return at any time to close it out (pun intended). 
Title: Re: Xonclock - eyecandy for TC
Post by: tobiaus on February 28, 2009, 10:33:26 PM
in austrumi, (it includes something much like xonclock, or it is xonclock) the only way i know to close the clock is to kill it. perhaps it's a compile feature (or i just didn't think to double right click.)

to close xonclock, right clicking twice seems to close it. (i haven't checked ps.) there is a man page, i don't think it's included. it would be lovely if someone posted the command line options here (shall i?)
Title: Re: Xonclock - eyecandy for TC
Post by: curaga on March 01, 2009, 12:44:54 AM
It can be placed always-on-top by editing the config file, ~/.xonclockrc

Man page:
Quote
xonclock(1)

NAME
       xonclock - simple X on-screen analog clock


SYNOPSIS
       xonclock [OPTIONS]


DESCRIPTION
       Shows an analog clock on X screen


OPTIONS
       --skin=FILE
         This  option  tells  xonclock  which    file to be used
         as a clock skin.   xonclock can handle PNG,  JPEG,  TIFF,
         XPM  images.     By default it loads an internal skin.

       --position=POSITION
         This  option defines the clock placement on X screen. It may
         be: TOP-LEFT,  TOP-CENTER,    TOP-RIGHT,        MIDDLE-LEFT,
         MIDDLE-CENTER, MIDDLE-RIGHT,   BOTTOM-LEFT,   BOTTOM-CENTER,
         BOTTOM-RIGHT.    By default it set to BOTTOM-RIGHT.

       --offset-v=OFFSET
         This option defines vertical offset of the clock concerning
         its base placement. Positive offset will shift clock lower,
         negative - upper.  Default: 0.

       --offset-h=OFFSET
         This option defines horizontal offset of   the  clock
         concerning its base placement. Positive offset will shift
         clock right, neg- ative - left.  Default: 0.

       --hour-length=LENGTH
         This option defines length of the clock hour hand. It
         ought  to be positive.  Default: automatic.

       --hour-width=WIDTH
         This option defines width of the clock hour hand. It ought
         to be positive.  Default: 4.

       --minute-length=LENGTH
         This option defines length of the clock minute hand. It
         ought to be positive.  Default: automatic.

       --minute-width=WIDTH
         This  option defines width of the clock minute hand. It
         ought to be positive.  Default: 3.

       --second-length=LENGTH
         This option defines length of the clock second hand. It
         ought to be positive.  Default: automatic.

       --second-width=WIDTH
         This  option defines width of the clock second hand. It
         ought to be positive.  Default: 1.

       --color-hour=R/G/B/A
         This option defines color of the clock hour  hand.
         R/G/B/A       are color components: R - red, G - green,
         B - blue, A - alpha (opac- ity). Each of them ought  to
         be  in  0...255  range.   Default: 255/0/0/255.

       --color-minute=R/G/B/A
         This  option defines color of the clock minute hand. R/G/B/A
         are color components: R - red, G - green, B - blue, A -
         alpha (opac- ity).  Each   of  them  ought  to  be in
         0...255 range.  Default: 0/255/0/255.

       --color-second=R/G/B/A
         This option defines color of the clock second hand. R/G/B/A
         are color components: R - red, G - green, B - blue,
         A - alpha (opac- ity). Each of them ought  to  be  in
         0...255  range.   Default: 0/0/255/255.

       --hands-rotation-axis=X/Y
         This option defines coordinates of the clock hands rotation
         axis concerning top left corner of a clock window. Usefull
         for  non- rectangular clock skins.  Default: center of
         the clock skin rec- tangle.

       --overlap=SIZE
         This option defines length of the clock hands tails  that
         over- laps thru center of the clock hands rotation axis.
         Default: 1/5 of the clock second hand length.

       --sleep=SECONDS
         This option defines startup sleep time. It useful if  you
         start xonclock  from  your       ~/.xinitrc  file (see
         startx script manual page).  Doing so you will prevent
         display connection  error  (it may ouccur if you start
         xonclock while your have no display cre- ated by X server).
         Default: 0.

       --top   Set the clock to be shown always on top.  Your   windows
       manager
         may  ignore  this request and the option may not work.
         Default: no.

       -s, --show-seconds
         Render the second hand.  Default: no.

       -d, --show-date
         Render the date string. Default: no.

       --date-font=FONTNAME
         This option defines a date string font. Detailed   descrition
         of the font name format see in fontconfig library manual.
         Default: fixed-8.

       --date-color=R/G/B/A
         This option defines color of a date string.  R/G/B/A
         are  color components:  R  - red, G - green, B - blue, A -
         alpha (opacity).   Each of them ought to be in 0...255 range.
         Default:   0/0/0/255.

       --date-position=POSITION
         This  option  defines  date string position on the clock. It
         may be: TOP-LEFT, TOP-CENTER, TOP-RIGHT, MIDDLE-LEFT,
         MIDDLE-CENTER, MIDDLE-RIGHT,   BOTTOM-LEFT,   BOTTOM-CENTER,
         BOTTOM-RIGHT.    By default it set to MIDDLE-CENTER.

       --date-offset-v=OFFSET
         This option defines vertical offset of the date string
         concern- ing  its  base  placement.  Positive offset will
         shift it lower, negative - upper.  Default: 10.

       --date-offset-h=OFFSET
         This option defines horizontal offset of the  date  string
         con- cerning its base placement. Positive offset will
         shift it right, negative - left.   Default: 0.

       --date-format=FORMAT
         This option defines format of the date string. Detailed
         descrip- tion  of  the  FORMAT may be found in strftime
         manual page (type man strftime).   Default: %G-%m-%d.

       --date-clip-format=FORMAT
         This option defines format of the date string to be pasted
         into X  clipboard.   Note  that  program   was  tested
         with KDE 3.4.1 (KWrite, KEdit) so on other systems it may
         doesn't work. No mul- tilanguage   support  are  provided for
         a while.   The date string will be copied into X clipboard
         on mouse left button click  over the  clock.  Detailed
         description of the FORMAT may be found in strftime manual
         page  (type  man   strftime).  Default:  %G-%m-%d %H:%M:%S.

       --movable
         Allows to move the clock with a mouse left button.  Default:
         not set.

       --use-background
         This option tells xonclock to merge clock skin with desktop
         root window  background image allowing to render the
         skins with alpha channel. It does not work with XPM skins.
         Default: not set.

       --remerge-sleep=MICROSECOND
         This option tells xonclock to sleep for MICROSECOND to
         be  sure that any obscured window has been refreshed while
         retrieving new background. This option is useful if  only
         --use-background   is used.  Default: 5000.

       --no-winredirect
         If  the program is started under KDE or GNOME (and maybe
         someone else) the clock may get hidden state. Try to set
         this  flag  to prevent  a  such  situation.   It may help
         I hope.  Default: not set.

       --tz-hour=VAL
         This option allows to customize system time-zone
         settings.   The hour  value  obtained  from  a system
         call will be calculated as hour's  system  value   +  VAL.
         The   valid  range  is  [-24;24].  Default: 0.

       --tz-minute=VAL
         This  option allows to customize system time-zone settings.
         The minute value obtained from a system call will be
         calculated  as minute's  system  value  +  VAL.  The  valid
         range is [-60;60].  Default: 0.

       --alpha-threshold=VAL
         This  option  defines  alpha  threshold  value  that  allows
         to slightly  tune  up  a   clock skin with alpha channel. It
         is only affected if the option --use-background is not set.
         Default: 0.

       -v, --version
         Prints program version and exit.

       -h, --help
         Display help and exit.


EVENTS
    -   You  may copy date string into X clipboard with mouse
    left button
        single click on xonclock. It works if xonclock has  been
        started with --show-date option only.

    -   You  may exit from xonclock with mouse right button double
    click.

    -   You may remerge desktop root window background  image
    and  clock
        skin  by mouse left button double click (it works if xonclock
        has been started with --use-background option only).

AUTHOR
       Written by Cyrill Gorcunov <gclion@mail.ru>.  There  is   ABSOLUTELY
       NO WARRANTY for this program.


COPYRIGHT
       It  may   be  freely  distributed  under the terms of GNU General
       Public License.

(C) 2005-2007 Cyrill V. Gorcunov    0.0.9.2
All long options may be used in the config file too.
Title: Re: Xonclock - eyecandy for TC
Post by: jpeters on March 01, 2009, 02:05:59 AM
ah....didn't know there was a config file. Loading with "xonclock --top" does it, and rt clicking twice
closes. I like it!! 
Title: Re: Xonclock - eyecandy for TC
Post by: tobiaus on March 01, 2009, 04:47:09 AM
thanks curaga. i was going to suggest that command line options are posted with new extensions from now on, but sometimes they will be too long, and it certainly won't fit in the .info
Title: Re: Xonclock - eyecandy for TC
Post by: curaga on March 01, 2009, 05:14:44 AM
tobiaus, maybe only for apps that don't list them in --help?
Title: Re: Xonclock - eyecandy for TC
Post by: tobiaus on March 01, 2009, 08:13:10 AM
tobiaus, maybe only for apps that don't list them in --help?

yes, at least. i use --help without thinking about it, others may not- the same way i can never remember to use-the-freakin-man-page. it's probably why i don't know twice as much about linux, but i normally prefer distros that conserve space by not including them, eh? and yes there are online man pages. i just think it would be an interesting convention for users of tc, but it is asking a lot and maybe you're right. quite likely, really.
Title: Re: Xonclock - eyecandy for TC
Post by: jpeters on March 01, 2009, 09:05:29 AM
I need to use the programs I tout...  I typed "man xonclock"  and there it was, fetching the manual from die.net onto my netrix browser. Instead, I had tried going to the home page, where I didn't find any documentation.....it's probably there somewhere....but I don't see it. 
Title: Re: Xonclock - eyecandy for TC
Post by: tobiaus on March 01, 2009, 10:44:00 AM
I typed "man xonclock"  and there it was, fetching the manual from die.net onto my netrix browser.

is that a feature of the netrik extension? i also tried man xonclock, even though i expected it wouldn't do anything in tc, because --help suggested it. 
Title: Re: Xonclock - eyecandy for TC
Post by: jpeters on March 01, 2009, 11:05:02 AM
I typed "man xonclock"  and there it was, fetching the manual from die.net onto my netrix browser.

is that a feature of the netrik extension? i also tried man xonclock, even though i expected it wouldn't do anything in tc, because --help suggested it. 

I use a script that I configured to work with Netrik:
http://forum.tinycorelinux.net/index.php?topic=569.msg3495#msg3495
Title: Re: Xonclock - eyecandy for TC
Post by: tobiaus on March 01, 2009, 01:34:54 PM
Quote
First it searches through /usr/share/doc, and if nothing is found loads  http://linux.die.net/man/${1}.

that's pretty easy, i think i'll write my own. thanks!
Title: Re: Xonclock - eyecandy for TC
Post by: jpeters on March 01, 2009, 01:40:56 PM
Quote
First it searches through /usr/share/doc, and if nothing is found loads  http://linux.die.net/man/${1}.

that's pretty easy, i think i'll write my own. thanks!

I think it gets a little tricky decending through folders and links correctly...at least according to Barry K who ain't no slouch!   
Title: Re: Xonclock - eyecandy for TC
Post by: tobiaus on March 02, 2009, 01:56:42 AM
well, if you pipe find /usr/share/$manfolder (not a real variable) into grep $1 (or something like that,) it should give you a pretty good idea whether you have the man page or not. i've thought of three ways to do it (some of them could be silly) while typing this, i chose the one easiest to explain in few words.

since i don't have a single man page on tc that i know of, i don't need that feature anyway, i can simply have man load the online version, but i don't deny it's a fun idea. you could even wget the file to /tmp, load into html2text (i'm more likely to have that than netrik) and pipe into less.
Title: Re: Xonclock - eyecandy for TC
Post by: jpeters on March 02, 2009, 04:09:58 PM
....or, you could just run the script and not download anything (in addition to being able to access multiple levels of doc, html, and links if you ever DO have them on your computer.  ;)
Title: Re: Xonclock - eyecandy for TC
Post by: tobiaus on March 02, 2009, 04:49:21 PM
that's very true, i could.