2001-09-14 Gergely Nagy * src/actions.c (cmd_info): new command * src/actions.h: prototype for it diff -ur ratpoison.lastmsg/src/actions.c ratpoison/src/actions.c --- ratpoison.lastmsg/src/actions.c Fri Sep 14 11:27:53 2001 +++ ratpoison/src/actions.c Fri Sep 14 11:43:05 2001 @@ -71,6 +71,7 @@ {"chdir", cmd_chdir, arg_STRING}, {"startup_message", cmd_startup_message, arg_STRING}, {"lastmsg", cmd_lastmsg, arg_VOID}, + {"info", cmd_info, arg_VOID}, /* Commands to set default behavior. */ {"defbarloc", cmd_defbarloc, arg_STRING}, @@ -1905,5 +1906,20 @@ cmd_lastmsg (int interactive, void *data) { message (last_message()); + return NULL; +} + +char * +cmd_info (int interactive, void *data) +{ + rp_window *win; + + if ((win = current_window()) == NULL) + return NULL; + + marked_message_printf (0, 0, "(%d,%d) %d(%s)", win->width, win->height, + win->number, + (!strcmp (win->user_name, "Unnamed")) ? + win->wm_name: win->user_name); return NULL; } diff -ur ratpoison.lastmsg/src/actions.h ratpoison/src/actions.h --- ratpoison.lastmsg/src/actions.h Fri Sep 14 11:27:53 2001 +++ ratpoison/src/actions.h Fri Sep 14 11:33:31 2001 @@ -96,6 +96,7 @@ char * cmd_chdir (int interactive, void *data); char * cmd_startup_message (int interactive, void *data); char * cmd_lastmsg (int interactive, void *data); +char * cmd_info (int interactive, void *data); /* void cmd_xterm (void *data); */