Adjuste second mode position when it's switching and if the clock is show out the term - tty-clock - port of tty-clock to OpenBSD, with pledge/unveil added as goodie.
 (HTM) git clone https://git.drkhsh.at/tty-clock.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 742224bb71dcf452288a18aa03d0fa135b960f49
 (DIR) parent abcff61de75472ca5cdcdecc2210363097f22e42
 (HTM) Author: Martin Duquesnoy <xorg62@gmail.com>
       Date:   Wed, 11 Mar 2009 21:04:28 +0100
       
       Adjuste second mode position when it's switching and if the clock is show out the term
       
       Diffstat:
         M ttyclock.c                          |      15 +++++++--------
       
       1 file changed, 7 insertions(+), 8 deletions(-)
       ---
 (DIR) diff --git a/ttyclock.c b/ttyclock.c
       @@ -208,7 +208,6 @@ draw_clock(void)
             draw_number(ttyclock->date.minute[0], 1, 20);
             draw_number(ttyclock->date.minute[1], 1, 27);
        
       -
             /* Draw the date */
             wbkgdset(ttyclock->datewin, (COLOR_PAIR(2)));
             mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr);
       @@ -290,12 +289,12 @@ clock_rebound(void)
        void
        set_second(void)
        {
       -     /* Reverse option value */
       -     clock_move(ttyclock->geo.x,
       -                ttyclock->geo.y,
       -                (ttyclock->geo.w = ((ttyclock->option.second = !ttyclock->option.second)) ? SECFRAMEW : NORMFRAMEW),
       -                ttyclock->geo.h);
       +     int new_w = (((ttyclock->option.second = !ttyclock->option.second)) ? SECFRAMEW : NORMFRAMEW);
       +     int y_adj;
       +
       +     for(y_adj = 0; (ttyclock->geo.y - y_adj) > (COLS - new_w - 1); ++y_adj);
        
       +     clock_move(ttyclock->geo.x, (ttyclock->geo.y - y_adj), new_w, ttyclock->geo.h);
        
             set_center(ttyclock->option.center);
        
       @@ -309,8 +308,8 @@ set_center(Bool b)
             {
                  ttyclock->option.rebound = False;
        
       -          clock_move((ttyclock->geo.x = (LINES / 2 - (ttyclock->geo.h / 2))),
       -                     (ttyclock->geo.y = (COLS  / 2 - (ttyclock->geo.w / 2))),
       +          clock_move((LINES / 2 - (ttyclock->geo.h / 2)),
       +                     (COLS  / 2 - (ttyclock->geo.w / 2)),
                             ttyclock->geo.w,
                             ttyclock->geo.h);
             }