diff -r ratpoison-cvs-20001228-1029/src/actions.c ratpoison-cvs-20001228-1029-with-clock/src/actions.c 4a5 > #include 5a7 > #include 12,13c14,16 < {XK_c, -1, "xterm", spawn}, < {XK_e, -1, "emacs", spawn}, --- > {XK_c, -1, TERM_PROG, spawn}, > {XK_e, -1, EDIT_PROG, spawn}, > {XK_x, -1, LOCK_PROG, spawn}, 18a22 > {XK_a, -1, 0, show_clock}, 23c27 < {XK_a, -1, 0, rename_current_window}, --- > {XK_A, -1, 0, rename_current_window}, 316a321,354 > } > > > /* Show the current time on the bar */ > void > show_clock (void *data) > { > screen_info *s; > char *msg; > time_t timep; > > msg = malloc(9); > if(msg == NULL) > { > fprintf(stderr, "Error allocation memory in show_clock()"); > return; > } > > timep = time(NULL); > if(timep == ((time_t)-1)) > { > perror("In show_clock() "); > return; > } > > strncpy(msg, ctime(&timep) + 11, 8); /* FIXME This could problary be done in fewer cpu cycles with asctime() or something. But I'm lazy and incompetent. - cosis */ > msg[8] = '\0'; > > if (rp_current_window) > { > s = rp_current_window->scr; > display_msg_in_bar (s, msg); > } > free(msg); diff -r ratpoison-cvs-20001228-1029/src/actions.h ratpoison-cvs-20001228-1029-with-clock/src/actions.h 26a27 > void show_clock (void *data); diff -r ratpoison-cvs-20001228-1029/src/conf.h ratpoison-cvs-20001228-1029-with-clock/src/conf.h 27a28,31 > #define TERM_PROG "xterm" /* IMO this is ugly. Configuration should be handled at run time. Perhaps like screen's bind command? - cosis */ > #define EDIT_PROG "emacs" > #define LOCK_PROG "xlock" >