Compare commits

..

No commits in common. 'termux' and 'master' have entirely different histories.

  1. 14
      ttyclock.c
  2. 1
      ttyclock.h

@ -70,7 +70,6 @@ init(void)
init_pair(0, ttyclock.bg, ttyclock.bg);
init_pair(1, ttyclock.bg, ttyclock.option.color);
init_pair(2, ttyclock.option.color, ttyclock.bg);
init_pair(3, ttyclock.bg, ttyclock.option.alt_color);
// init_pair(0, ttyclock.bg, ttyclock.bg);
// init_pair(1, ttyclock.bg, ttyclock.option.color);
// init_pair(2, ttyclock.option.color, ttyclock.bg);
@ -256,7 +255,7 @@ draw_clock(void)
/* Draw hour numbers */
draw_number(ttyclock.date.hour[0], 1, 1);
draw_number(ttyclock.date.hour[1], 1, 8);
chtype dotcolor = COLOR_PAIR(3);
chtype dotcolor = COLOR_PAIR(1);
if (ttyclock.option.blink && time(NULL) % 2 == 0)
dotcolor = COLOR_PAIR(2);
@ -563,7 +562,6 @@ main(int argc, char **argv)
strncpy(ttyclock.option.format, "%F", sizeof (ttyclock.option.format));
/* Default color */
ttyclock.option.color = COLOR_GREEN; /* COLOR_GREEN = 2 */
ttyclock.option.alt_color = 100; /* COLOR_GREEN = 2 */
/* Default delay */
ttyclock.option.delay = 1; /* 1FPS */
ttyclock.option.nsdelay = 0; /* -0FPS */
@ -571,7 +569,7 @@ main(int argc, char **argv)
atexit(cleanup);
while ((c = getopt(argc, argv, "iuvsScbtrhBxnDX:C:f:d:T:a:")) != -1)
while ((c = getopt(argc, argv, "iuvsScbtrhBxnDC:f:d:T:a:")) != -1)
{
switch(c)
{
@ -583,7 +581,6 @@ main(int argc, char **argv)
" -x Show box \n"
" -c Set the clock at the center of the terminal \n"
" -C [0-7] Set the clock color \n"
" -X [0-7] Set the alternate clock color \n"
" -b Use bold colors \n"
" -t Set the hour in 12h format \n"
" -u Use UTC time \n"
@ -627,10 +624,6 @@ main(int argc, char **argv)
if(atoi(optarg) >= 0 && atoi(optarg) < 8)
ttyclock.option.color = atoi(optarg);
break;
case 'X':
if(atoi(optarg) >= 0 && atoi(optarg) < 8)
ttyclock.option.alt_color = atoi(optarg);
break;
case 't':
ttyclock.option.twelve = true;
break;
@ -678,9 +671,6 @@ main(int argc, char **argv)
}
}
if ( ttyclock.option.alt_color == 100) {
ttyclock.option.alt_color = ttyclock.option.color;
}
init();
attron(A_BLINK);
while(ttyclock.running)

@ -81,7 +81,6 @@ typedef struct
bool noquit;
char format[100];
int color;
int alt_color;
bool bold;
long delay;
bool blink;

Loading…
Cancel
Save