xorg62 / tty-clock Goto Github PK
View Code? Open in Web Editor NEWClock using lib ncurses
License: BSD 3-Clause "New" or "Revised" License
Clock using lib ncurses
License: BSD 3-Clause "New" or "Revised" License
Having stopwatch and timer functionality will be great! thanks
I'd love to be able to specify a custom label via a new argument. This label should be shown above the time, just like the date can be shown below. E.g. -l "New York"
.
Along with #50, this would allow for awesome World Clock monitors, with multiple clocks showing the time in New York, London, Tokyo, etc. -- or any list of cities relevant for yourself or your business.
Plz help it looks so good but that bugs me to no end.
[dave@manjaro tty-clock-master :) ]$ make
build ttyclock.c
CC ttyclock.c
/tmp/ccky1p0y.o: In function init': ttyclock.c:(.text+0xac): undefined reference to
newterm'
ttyclock.c:(.text+0xec): undefined reference to set_term' ttyclock.c:(.text+0xf3): undefined reference to
initscr'
ttyclock.c:(.text+0xf8): undefined reference to cbreak' ttyclock.c:(.text+0xfd): undefined reference to
noecho'
ttyclock.c:(.text+0x104): undefined reference to stdscr' ttyclock.c:(.text+0x111): undefined reference to
keypad'
ttyclock.c:(.text+0x116): undefined reference to start_color' ttyclock.c:(.text+0x120): undefined reference to
curs_set'
ttyclock.c:(.text+0x127): undefined reference to stdscr' ttyclock.c:(.text+0x12f): undefined reference to
wclear'
ttyclock.c:(.text+0x134): undefined reference to use_default_colors' ttyclock.c:(.text+0x16a): undefined reference to
init_pair'
ttyclock.c:(.text+0x18e): undefined reference to init_pair' ttyclock.c:(.text+0x1b2): undefined reference to
init_pair'
ttyclock.c:(.text+0x1b9): undefined reference to stdscr' ttyclock.c:(.text+0x1c1): undefined reference to
wrefresh'
ttyclock.c:(.text+0x399): undefined reference to newwin' ttyclock.c:(.text+0x3e9): undefined reference to
wborder'
ttyclock.c:(.text+0x41b): undefined reference to wattr_on' ttyclock.c:(.text+0x4ac): undefined reference to
newwin'
ttyclock.c:(.text+0x4fc): undefined reference to wborder' ttyclock.c:(.text+0x51b): undefined reference to
clearok'
ttyclock.c:(.text+0x533): undefined reference to stdscr' ttyclock.c:(.text+0x540): undefined reference to
nodelay'
ttyclock.c:(.text+0x564): undefined reference to wrefresh' ttyclock.c:(.text+0x57a): undefined reference to
wrefresh'
/tmp/ccky1p0y.o: In function signal_handler': ttyclock.c:(.text+0x5b6): undefined reference to
endwin'
ttyclock.c:(.text+0x5d1): undefined reference to endwin' /tmp/ccky1p0y.o: In function
cleanup':
ttyclock.c:(.text+0x623): undefined reference to delscreen' /tmp/ccky1p0y.o: In function
draw_number':
ttyclock.c:(.text+0x9c1): undefined reference to wattr_on' ttyclock.c:(.text+0x9e3): undefined reference to
wattr_off'
ttyclock.c:(.text+0xa29): undefined reference to wbkgdset' ttyclock.c:(.text+0xa47): undefined reference to
wmove'
ttyclock.c:(.text+0xa67): undefined reference to waddch' ttyclock.c:(.text+0xa8f): undefined reference to
wrefresh'
/tmp/ccky1p0y.o: In function draw_clock': ttyclock.c:(.text+0xb1f): undefined reference to
wbkgdset'
ttyclock.c:(.text+0xb3f): undefined reference to wmove' ttyclock.c:(.text+0xb64): undefined reference to
waddnstr'
ttyclock.c:(.text+0xb84): undefined reference to wmove' ttyclock.c:(.text+0xba9): undefined reference to
waddnstr'
ttyclock.c:(.text+0xc13): undefined reference to wattr_on' ttyclock.c:(.text+0xc35): undefined reference to
wattr_off'
ttyclock.c:(.text+0xc5e): undefined reference to wbkgdset' ttyclock.c:(.text+0xc94): undefined reference to
mvwprintw'
ttyclock.c:(.text+0xcaa): undefined reference to wrefresh' ttyclock.c:(.text+0xcd7): undefined reference to
wbkgdset'
ttyclock.c:(.text+0xcf7): undefined reference to wmove' ttyclock.c:(.text+0xd1c): undefined reference to
waddnstr'
ttyclock.c:(.text+0xd3c): undefined reference to wmove' ttyclock.c:(.text+0xd61): undefined reference to
waddnstr'
/tmp/ccky1p0y.o: In function clock_move': ttyclock.c:(.text+0xdd1): undefined reference to
wbkgdset'
ttyclock.c:(.text+0xe0c): undefined reference to wborder' ttyclock.c:(.text+0xe26): undefined reference to
werase'
ttyclock.c:(.text+0xe3c): undefined reference to wrefresh' ttyclock.c:(.text+0xe69): undefined reference to
wbkgdset'
ttyclock.c:(.text+0xea4): undefined reference to wborder' ttyclock.c:(.text+0xebe): undefined reference to
werase'
ttyclock.c:(.text+0xed4): undefined reference to wrefresh' ttyclock.c:(.text+0xf0c): undefined reference to
mvwin'
ttyclock.c:(.text+0xf44): undefined reference to wresize' ttyclock.c:(.text+0xfcb): undefined reference to
mvwin'
ttyclock.c:(.text+0x1000): undefined reference to wresize' ttyclock.c:(.text+0x1049): undefined reference to
wborder'
ttyclock.c:(.text+0x1096): undefined reference to wborder' ttyclock.c:(.text+0x10b0): undefined reference to
wrefresh'
ttyclock.c:(.text+0x10c6): undefined reference to wrefresh' /tmp/ccky1p0y.o: In function
clock_rebound':
ttyclock.c:(.text+0x1112): undefined reference to LINES' ttyclock.c:(.text+0x1167): undefined reference to
COLS'
/tmp/ccky1p0y.o: In function set_second': ttyclock.c:(.text+0x123e): undefined reference to
COLS'
/tmp/ccky1p0y.o: In function set_center': ttyclock.c:(.text+0x12d0): undefined reference to
COLS'
ttyclock.c:(.text+0x12f8): undefined reference to LINES' /tmp/ccky1p0y.o: In function
set_box':
ttyclock.c:(.text+0x135b): undefined reference to wbkgdset' ttyclock.c:(.text+0x1376): undefined reference to
wbkgdset'
ttyclock.c:(.text+0x13a3): undefined reference to wbkgdset' ttyclock.c:(.text+0x13be): undefined reference to
wbkgdset'
ttyclock.c:(.text+0x13f9): undefined reference to wborder' ttyclock.c:(.text+0x1438): undefined reference to
wborder'
ttyclock.c:(.text+0x1479): undefined reference to wborder' ttyclock.c:(.text+0x14b8): undefined reference to
wborder'
ttyclock.c:(.text+0x14d2): undefined reference to wrefresh' ttyclock.c:(.text+0x14e8): undefined reference to
wrefresh'
/tmp/ccky1p0y.o: In function key_event': ttyclock.c:(.text+0x152a): undefined reference to
stdscr'
ttyclock.c:(.text+0x1532): undefined reference to wgetch' ttyclock.c:(.text+0x15aa): undefined reference to
init_pair'
ttyclock.c:(.text+0x15c7): undefined reference to init_pair' ttyclock.c:(.text+0x15dd): undefined reference to
stdscr'
ttyclock.c:(.text+0x15e5): undefined reference to wgetch' ttyclock.c:(.text+0x1670): undefined reference to
LINES'
ttyclock.c:(.text+0x173d): undefined reference to COLS' ttyclock.c:(.text+0x1921): undefined reference to
init_pair'
ttyclock.c:(.text+0x193e): undefined reference to init_pair' /tmp/ccky1p0y.o: In function
main':
ttyclock.c:(.text+0x1d8d): undefined reference to stdscr' ttyclock.c:(.text+0x1d9f): undefined reference to
wattr_on'
ttyclock.c:(.text+0x1dc7): undefined reference to `endwin'
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target 'tty-clock' failed
make: *** [tty-clock] Error 1
[dave@manjaro tty-clock-master :( ]$
I'd love to have a way of making the font larger, perhaps having the display fill the window.
The large clock always outputs leading zero, even when 12 hour display is selected. In the United States it is customary to omit this digit when displaying the time in 12-hour format. Most users in this region expect the time to look like '%l:%M %p
This line should be conditional on 24-hour mode or a value >9.
Line 256 in f2f847c
not available in apt apt-get dnf snap flathub repositories
We've had a request to include this in the homebrew package manager, but we need a stable release to include it. Would you be able to tag a release? Thanks!
please add templates to run tty-clock on selected vt at boottime
Do we have yum package available for CentOS?
build ttyclock.c
CC ttyclock.c
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xa7): undefined reference to newterm' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xea): undefined reference to
set_term'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xf1): undefined reference to initscr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xf6): undefined reference to
cbreak'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xfb): undefined reference to noecho' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x100): undefined reference to
ncwrap_stdscr'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x110): undefined reference to keypad' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x115): undefined reference to
start_color'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x121): undefined reference to curs_set' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x126): undefined reference to
ncwrap_stdscr'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x12e): undefined reference to wclear' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x133): undefined reference to
use_default_colors'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x16b): undefined reference to init_pair' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x193): undefined reference to
init_pair'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1bb): undefined reference to init_pair' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1c0): undefined reference to
ncwrap_stdscr'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1c8): undefined reference to wrefresh' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x379): undefined reference to
newwin'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x3de): undefined reference to wborder' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x40d): undefined reference to
wattr_on'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x48b): undefined reference to newwin' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x4f0): undefined reference to
wborder'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x50b): undefined reference to clearok' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x520): undefined reference to
ncwrap_stdscr'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x530): undefined reference to nodelay' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x54f): undefined reference to
wrefresh'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x562): undefined reference to wrefresh' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x596): undefined reference to
endwin'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x5af): undefined reference to endwin' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x608): undefined reference to
delscreen'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x93f): undefined reference to wattr_on' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x964): undefined reference to
wattr_off'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x9a1): undefined reference to wbkgdset' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x9c2): undefined reference to
wmove'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x9e2): undefined reference to waddch' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xa07): undefined reference to
wrefresh'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xa97): undefined reference to wbkgdset' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xaba): undefined reference to
wmove'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xae2): undefined reference to waddnstr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xb05): undefined reference to
wmove'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xb2d): undefined reference to waddnstr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xb9c): undefined reference to
wattr_on'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xbc1): undefined reference to wattr_off' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xbe8): undefined reference to
wbkgdset'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xc17): undefined reference to mvwprintw' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xc2a): undefined reference to
wrefresh'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xc54): undefined reference to wbkgdset' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xc77): undefined reference to
wmove'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xc9f): undefined reference to waddnstr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xcc2): undefined reference to
wmove'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xcea): undefined reference to waddnstr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xd50): undefined reference to
wbkgdset'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xda3): undefined reference to wborder' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xdb6): undefined reference to
werase'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xdc9): undefined reference to wrefresh' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xdf4): undefined reference to
wbkgdset'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xe47): undefined reference to wborder' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xe5a): undefined reference to
werase'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xe6d): undefined reference to wrefresh' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xea4): undefined reference to
mvwin'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xedb): undefined reference to wresize' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xf53): undefined reference to
mvwin'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0xf87): undefined reference to wresize' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0xfe6): undefined reference to
wborder'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1045): undefined reference to wborder' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1058): undefined reference to
wrefresh'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x106b): undefined reference to wrefresh' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x10af): undefined reference to
ncwrap_LINES'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x10f5): undefined reference to ncwrap_COLS' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x11c2): undefined reference to
ncwrap_COLS'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1253): undefined reference to ncwrap_COLS' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1278): undefined reference to
ncwrap_LINES'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x12e2): undefined reference to wbkgdset' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x12fd): undefined reference to
wbkgdset'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1328): undefined reference to wbkgdset' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1343): undefined reference to
wbkgdset'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1396): undefined reference to wborder' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x13e9): undefined reference to
wborder'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1441): undefined reference to wborder' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1494): undefined reference to
wborder'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x14a7): undefined reference to wrefresh' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x14ba): undefined reference to
wrefresh'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x14ef): undefined reference to ncwrap_stdscr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x14f7): undefined reference to
wgetch'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1571): undefined reference to init_pair' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1594): undefined reference to
init_pair'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x15a8): undefined reference to ncwrap_stdscr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x15b0): undefined reference to
wgetch'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1637): undefined reference to ncwrap_LINES' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1706): undefined reference to
ncwrap_COLS'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x18e3): undefined reference to init_pair' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1906): undefined reference to
init_pair'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1d40): undefined reference to ncwrap_stdscr' /tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1d58): undefined reference to
wattr_on'
/tmp/ccdQcYBA.o:ttyclock.c:(.text+0x1d7e): undefined reference to `endwin'
collect2: error: ld returned 1 exit status
make: *** [Makefile:24: tty-clock] Error 1
There is always some sort of margin, it would be great if we could specify the margin in the options.
Thanks.
I was wondering if you wouldn't mind editing the --help output to clarify how to change the date formatting.
I have tried a number of different ways, but each time I get a segmentation fault.
Thanks for the great clock :D
Hello! I'm trying to run ttyclock from within a systemd
service and currently it is erroring with
ttyclock: ttyclock.c:50: init: Assertion 'ttyclock->ttyscr != ((void *)0)' failed.
What can i do to fix this?
My command is: sudo tty-clock -tnc -C 6 -T /dev/tty6
I'm using Ubuntu Gnome 16.04
From 73584bd10bdcdf358c2a8ceba76048763ee8b378 Mon Sep 17 00:00:00 2001
From: Guenter Knauf
Date: Thu, 4 Nov 2010 10:37:18 +0100
Subject: [PATCH 1/3] Fixed segfault with now non-working -f option.
The commit to add the -d option broke getopt for -f taking an argument.
---
ttyclock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ttyclock.c b/ttyclock.c
index 8fa2306..3a7122c 100644
--- a/ttyclock.c
+++ b/ttyclock.c
@@ -420,7 +420,7 @@ main(int argc, char **argv)
/* Default delay */
ttyclock->option.delay = 40000000; /* 25FPS */
- while ((c = getopt(argc, argv, "tvsrcihfd:C:")) != -1)
+ while ((c = getopt(argc, argv, "tvsrcihf:d:C:")) != -1)
{
switch(c)
{
--
1.7.2.2
-d delay
is cool if you want increments other than the default 1sec.22:17:00, 22:17:05, 22:17:10, …
you have to achieve this by starting at the right time. Not so easy to get that right manually.22:17:02, 22:17:07, 22:17:12
.0, delay, delay*2, delay*3, …
until number generation hits 60.tty-clock
into that "aligned delay mode" and is yet "unaligned" (e.g. 22:17:02
) the clock instead starts with 22:17:0_
with the _
part denoting that it waits for the next "clean entry point".22:17:05
and from then on "runs aligned".Would love to see that feature!
-D delay
-d
-D
is already takes for "Hide Date".-A
. Or something else.In the current version of tty-clock, the x
variable represents the y axis
on the Cartesian plain.
Even the ttyclock.geo.x
changes the position of the clock on the y axis
.
This should be changed so that the x
variable is a value on the x axis
Hi!
I have a question, hopefully easy to answer to you.
I use an old laptop as internetradio. I have installed ubuntu 20.04 server with autologin. I start the radio with "mpc play 1" in a script started by the crontab (@reboot). That works fine.
However I want start the tty-clock after the radio. I use "tty-clock -s -c" but it do not start. When I start the script by "./script.sh" it works.
Have anyone an idea?
When I try to execute the program using python2 (2.7.16) I get the following error:
File "./tty-countdown", line 94
print(center(asciiFormat(t, font), getTermDimensions()), end="")
^
SyntaxError: invalid syntax
Since the program can only be executed with python3, I suggest you to force python3 by changing the first line of the script to #!/usr/bin/python3.
Also, I find better to install programs on .local/bin and .local/bin/share, but thats up to personal preference.
Could you add an option for fullscreen redraw.
To reproduce you can run x-clock and echo qwe > /dev/prs/X
from another terminal.
From 90c9ed5f001fc439ee05e45b06eaa4adc51d4658 Mon Sep 17 00:00:00 2001
From: Guenter Knauf
Date: Thu, 4 Nov 2010 10:41:53 +0100
Subject: [PATCH 2/3] Changed default date format.
In order to avoid mixing up day and month its better to use %F
(the ISO 8601 date format) to be more international understandable.
---
ttyclock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ttyclock.c b/ttyclock.c
index 3a7122c..19a9d27 100644
--- a/ttyclock.c
+++ b/ttyclock.c
@@ -414,7 +414,7 @@ main(int argc, char **argv)
/* Date format */
ttyclock->option.format = malloc(sizeof(char) * 100);
/* Default date format */
- strncpy(ttyclock->option.format, "%d/%m/%Y", 100);
+ strncpy(ttyclock->option.format, "%F", 100);
/* Default color */
ttyclock->option.color = COLOR_GREEN; /* COLOR_GREEN = 2 */
/* Default delay */
--
1.7.2.2
tty-clock looks nice, so could it have a screenshot?
thanks!
I installed tty-clock on my system (Endeavour OS) which uses custom color schemes, and i noticed that tty-clock does not use these system-defined colors, but rather hardcoded ones.
I would love for some level of configuration to be possible, for example, passing CLI options through the config file instead of the terminal, or use custom color schemes.
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ date
Sat 08 May 2021 04:22:50 AM CEST
$ LC_TIME="fr_FR.UTF-8" date
sam. 08 mai 2021 04:25:13 CEST
$ LC_TIME="fr_FR.UTF-8" tty-clock -f"%A %B"
Output :
Saturday May
Hello,
This is on a Debian 9 system. I also made a Virtualbox VM running Debian 9 as well as I can't change the time on the production system without causing issues. Both systems exhibit this behavior.
Both systems timezone is EDT, and system time is set to this as well. I noticed that after 1:00pm (13:00), "PM" is displayed correctly. It just seems that from noon - 12:59 that tty-clock shows "AM" when the -t
argument is present.
vom@debian9-test:~$ date +"%c"
Sun 25 Aug 2019 12:31:50 PM EDT
Exact command line for that screenshot was tty-clock -s -x -C 6 -t
Let me know if there's any other system/environment information you need. Thanks.
Does tty-clock really require a tty when using the -T option?
I have the following line on a cron script:
tty-clock -S -c -t -d 3 -T /dev/tty1
And it doesn't work because cron doesn't have a tty, but it's not really required because I'm sending it to /dev/tty1.
Tell me if I'm wrong...
Hi
As the title says:
Why is this described as "analog clock in ncurses" when it shows a digital clock?
Thanks for adding the Makefile patch from hasufell so awesome quickly!
And for writting tty-clock of course.
Btw - I'm packaging tty-clock for Gentoo (sunrise overlay).
Regards
Wuodan
it was small for me, so I rewrited it to use a 5x7 matrix for each number, instead of the 3x5 one that it comes with...
http://nikyscripts.svn.sourceforge.net/viewvc/nikyscripts/ttyclock-1.1a_5x7/
also, it's likely that i'll do it even bigger .... say, 7x9 or so.
PS: sorry for the sourceforge repo, i have there all my little projects, so i first uploaded it there... then i realised it would be better if i share it with the developers.
I'd like propose an idea to @xorg62 after seeing a couple of long standing and already resolved issues still left open, also @anarcat seems to be on top of them, and staying through all these years.
@xorg62 would you like to have a co-maintainer/collaborator to help you out? If you would, I am nominating @anarcat.
Disclaimer: I do not know @anarcat or have not read much of the codes.
If the seconds mode is on:
13:37:00
↑ ^———— DOES NOT BLINK
BLINKS
I like how there's already the -u
option to get the clock to show UTC. How about another option to define a time zone, relative to UTC? E.g. -z +2:00
, to be able to show CEST even without having the computer clock set to this time zone.
Along with #51, this would allow for awesome World Clock monitors, with multiple clocks showing the time in New York, London, Tokyo, etc. -- or any list of cities relevant for yourself or your business.
Hi,
I would like to package tty-clock for openSUSE but couldn't find a LICENCE file or any information about it. tty-clock Debian's package show a "Copyright with condition" in the Copyright file, so what would be the appropriate term to put in my rpm spec file ?
Thank you.
From 6d2993057c919b8479688d92d94d7653913a067d Mon Sep 17 00:00:00 2001
From: Guenter Knauf
Date: Thu, 4 Nov 2010 10:49:22 +0100
Subject: [PATCH 3/3] Added -d to program usage outout and to README.
---
README | 3 ++-
ttyclock.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/README b/README
index e18294d..62d1726 100755
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-usage : tty-clock [-sctrvih] [-C [0-7]] [-f format]
+usage : tty-clock [-sctrvih] [-C [0-7]] [-f format] [-d delay]
-s Show seconds
-c Set the clock at the center of the terminal
-C [0-7] Set the clock color
@@ -8,3 +8,4 @@ usage : tty-clock [-sctrvih] [-C [0-7]] [-f format]
-v Show tty-clock version
-i Show some info about tty-clock
-h Show this page
+ -d delay Set the delay between two redraws of the clock
diff --git a/ttyclock.c b/ttyclock.c
index 19a9d27..1a8daee 100644
--- a/ttyclock.c
+++ b/ttyclock.c
@@ -426,7 +426,7 @@ main(int argc, char **argv)
{
case 'h':
default:
- printf("usage : tty-clock [-sctrvih] [-C [0-7]] [-f format] \n"
+ printf("usage : tty-clock [-sctrvih] [-C [0-7]] [-f format] [-d delay] \n"
" -s Show seconds \n"
" -c Set the clock at the center of the terminal \n"
" -C [0-7] Set the clock color \n"
--
1.7.2.2
Yesterday I was seeing correct value for field [AM]/[PM]. But then I didn't check at this hour of the day... Compare the correct time from my desktop at top right of the screen and what tty-clock reports. Also, the print for '%a, %d %b %Y %z'
string seems to be off center.
tty-clock -ct -f '%a, %d %b %Y %z'
➜ tty-clock git:(master) make
build ttyclock.c
CC ttyclock.c
Undefined symbols for architecture x86_64:
"_COLS", referenced from:
_set_center in ttyclock-bc2903.o
_clock_rebound in ttyclock-bc2903.o
_set_second in ttyclock-bc2903.o
_key_event in ttyclock-bc2903.o
"_LINES", referenced from:
_set_center in ttyclock-bc2903.o
_clock_rebound in ttyclock-bc2903.o
_key_event in ttyclock-bc2903.o
"_cbreak", referenced from:
_init in ttyclock-bc2903.o
"_clearok", referenced from:
_init in ttyclock-bc2903.o
"_curs_set", referenced from:
_init in ttyclock-bc2903.o
"_delscreen", referenced from:
_cleanup in ttyclock-bc2903.o
"_endwin", referenced from:
_signal_handler in ttyclock-bc2903.o
_main in ttyclock-bc2903.o
"_init_pair", referenced from:
_init in ttyclock-bc2903.o
_key_event in ttyclock-bc2903.o
"_initscr", referenced from:
_init in ttyclock-bc2903.o
"_keypad", referenced from:
_init in ttyclock-bc2903.o
"_mvwin", referenced from:
_clock_move in ttyclock-bc2903.o
"_mvwprintw", referenced from:
_draw_clock in ttyclock-bc2903.o
"_newterm", referenced from:
_init in ttyclock-bc2903.o
"_newwin", referenced from:
_init in ttyclock-bc2903.o
"_nodelay", referenced from:
_init in ttyclock-bc2903.o
"_noecho", referenced from:
_init in ttyclock-bc2903.o
"_set_term", referenced from:
_init in ttyclock-bc2903.o
"_start_color", referenced from:
_init in ttyclock-bc2903.o
"_stdscr", referenced from:
_init in ttyclock-bc2903.o
_key_event in ttyclock-bc2903.o
_main in ttyclock-bc2903.o
"_use_default_colors", referenced from:
_init in ttyclock-bc2903.o
"_waddch", referenced from:
_draw_number in ttyclock-bc2903.o
"_waddnstr", referenced from:
_draw_clock in ttyclock-bc2903.o
"_wattr_off", referenced from:
_draw_number in ttyclock-bc2903.o
_draw_clock in ttyclock-bc2903.o
"_wattr_on", referenced from:
_init in ttyclock-bc2903.o
_draw_number in ttyclock-bc2903.o
_draw_clock in ttyclock-bc2903.o
_main in ttyclock-bc2903.o
"_wbkgdset", referenced from:
_draw_number in ttyclock-bc2903.o
_draw_clock in ttyclock-bc2903.o
_clock_move in ttyclock-bc2903.o
_set_box in ttyclock-bc2903.o
"_wborder", referenced from:
_init in ttyclock-bc2903.o
_clock_move in ttyclock-bc2903.o
_set_box in ttyclock-bc2903.o
"_wclear", referenced from:
_init in ttyclock-bc2903.o
"_werase", referenced from:
_clock_move in ttyclock-bc2903.o
"_wgetch", referenced from:
_key_event in ttyclock-bc2903.o
"_wmove", referenced from:
_draw_number in ttyclock-bc2903.o
_draw_clock in ttyclock-bc2903.o
"_wrefresh", referenced from:
_init in ttyclock-bc2903.o
_draw_number in ttyclock-bc2903.o
_draw_clock in ttyclock-bc2903.o
_clock_move in ttyclock-bc2903.o
_set_box in ttyclock-bc2903.o
"_wresize", referenced from:
_clock_move in ttyclock-bc2903.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tty-clock] Error 1
On OS X in iTerm2. I'm not very advanced so this may be a simple dependency that I'm missing, but help pointing me in the right direction here would be appreciated.
I have TTY-clock running on various TVs around my house and it is my primary way of telling the time of day when I'm not either outside (with my phone) or working at a desktop (when I use other clocks)
One feature TTY-clock lacks that my other clocks have, is that it does not tell me the day of the week, even though it displays the date. I have to consult a calendar if I want to know what day it is. It would be really nice if TTY-clock could have an option display a three letter day of the week abbreviation (MON TUE WEN THU FRI SAT SUN) to the left of the time, similar to how there is an option to display seconds on the right side.
Would be awesome to specify a time or date and have the clock count down.
Hello!
I am the maintainer of the debian package, and along with @carla-v, we have worked on making "real" releases of tty-clock, which is quite useful for the debian package. The @carla-v tree is already at 2.0:
https://github.com/carla-v/tty-clock/releases
The debian package also followed that naming convention:
http://packages.qa.debian.org/t/tty-clock.html
It seems that there was new development here, and I would be fine to consider this upstream again, however to keep some consistency on our side, it would be nice if there would be a (say) 3.0 (or anything greater than 2.0) release that would encompass the new changes in the code.
Is that something that could be considered?
Thanks.
When compared with other software, tty-clock seems actually to run one or two seconds late.
In the above screenshot, 4 clocks are running, from top to bottom:
xclock -d -update 1
vtclock -v -3
(nothing special about those flags, just a nicer font)tty-clock -s
Note that we don't see it in the screenshot, but xmobar is actually lagging a little behind the other two clocks, say about 500ms. Here's a screencast that shows the behavior more precisely.
I find it mind-boggling that 4 clocks can't agree on the time on my computer, this gotta have some profound meaning involving long hair and swiss patent offices, but i am not certain... ;)
Please add locale support. (weekday name for example)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.