WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tinyclock, yet another clock for the desktop  (Read 2335 times)

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5391
tinyclock, yet another clock for the desktop
« on: August 05, 2012, 09:45:03 PM »
A relatively small clock for the desktop. Stripped it's about 8000 bytes, sstrip will reduce that to 6700 bytes. Runs
under Xorg or Xvesa. Has been tested under TC3.4 and TC4.1 with flwm_topside.
From the C source file:
Code: [Select]
/* Tinyclock is a small clock for the desktop. Written by Richard A. Rost Aug. 5, 2012
 * The first time it is run, it will create the file ~/.config/tinyclock/tinyclock.conf
 * If you update this file while it's running, it will re-read the conf file and apply
 * the new settings. If you drag the clock to a new location, it will update the conf
 * file. Empty lines and lines beginning with # are ignored. There are no spaces
 * allowed before or after the = signs.
 *
 * For a list of appropriate fonts available on your system:
 *    xlsfonts -f -*-*-*-*-*-*-*-S-DPIx-DPIy-T-*-iso8859-1
 * Where:
 * S  Size of font in tenth of a point. For a 12 point font, use 120
 * DPIx and DPIy  These values can be found in the conf file
 * T  Use  p  for proportional. For monospace (fixed), try  m  or  c
 *
 * A proper font line in the conf file should look similiar to this:
 *    font=-b&h-luxi sans-bold-o-normal-*-*-140-95-94-p-*-iso8859-1
 *
 * For more information about specifying fonts, see:
 * http://menehune.opt.wfu.edu/Kokua/Irix_6.5.21_doc_cd/usr/share/Insight/library/SGI_bookshelves/SGI_Developer/books/XLib_PG/sgi_html/apa.html
 *
 * To compile, install compiletc, xorg-7.x-dev and run:
 *    gcc  -march=i486 -mtune=i686 -Os -s -pipe -Wall -lX11 tinyclock.c -o tinyclock
 * Ignore the  'format' and 'charascent' may be used uninitialized  warnings.
This is a sample conf file:
Code: [Select]
#DPIx=95 DPIy=94  Desktop=1920x1080
xpos=1701
ypos=1042
12/24=12
font=-b&h-luxi mono-bold-o-normal-*-*-140-95-94-m-*-iso8859-1
I've attached the C source code for anyone who wants to try this program. I've also attached a png of the clock.
Unfortunately, imlib2_grab clipped the border.
« Last Edit: August 07, 2012, 09:06:56 AM by Rich »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5391
Re: tinyclock, yet another clock for the desktop
« Reply #1 on: August 05, 2012, 10:20:12 PM »
For a really small, no frills, script based clock, see:
http://forum.tinycorelinux.net/index.php/topic,13794.0.html

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 5391
Re: tinyclock, yet another clock for the desktop
« Reply #2 on: August 07, 2012, 09:11:24 AM »
I replace the attached png in the original post with a much better screen shot. The larger clock is from the C based
program and the smaller one is produced by the script mentioned in the second post.