diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | doc/ratpoison.texi | 3 | ||||
-rw-r--r-- | src/window.c | 12 |
4 files changed, 23 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2004-05-19 Shawn Betts <sabetts@vcn.bc.ca> + + * src/window.c (format_window_name): add %f format option + 2004-05-05 Shawn Betts <sabetts@vcn.bc.ca> * src/input.c (grab_key): use keysym_to_keycode_mod to get the @@ -1,5 +1,10 @@ ratpoison NEWS --- history of user-visible changes. -*- outline -*- +* Changes since 1.3.0-rc2-beta2 +** new format option %f +This options displays the frame number the window is in or a space if +it is not in a window. + * Changes since 1.3.0-rc2-beta1 ** New command 'set' set replaces the def* commands. For example 'defwinliststyle column' diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi index db2c0a7..6061d70 100644 --- a/doc/ratpoison.texi +++ b/doc/ratpoison.texi @@ -369,6 +369,9 @@ X11 Window ID @item %l A unique number based on when the window was last accessed. The higher the number, the more recently it was accessed. +@item %f +The frame number the window is displayed in or a space if it is not in +a frame. @end table When called non-interactively with no arguments, the current setting is diff --git a/src/window.c b/src/window.c index c39142a..8e71afb 100644 --- a/src/window.c +++ b/src/window.c @@ -329,7 +329,6 @@ give_window_focus (rp_window *win, rp_window *last_win) counter++; win->last_access = counter; - unhide_window (win); if (defaults.warp) @@ -544,6 +543,7 @@ print_window_information (rp_window *win) %c - resource class %i - X11 Window ID %l - last access number + %f - print the frame number the window is in */ static void @@ -607,6 +607,16 @@ format_window_name (char *fmt, rp_window_elem *win_elem, rp_window *other_win, sbuf_concat (buffer, dbuf); break; + case 'f': + if (win_elem->win->frame_number != EMPTY) + { + snprintf (dbuf, 9, "%d", win_elem->win->frame_number); + sbuf_concat (buffer, dbuf); + } + else + sbuf_concat (buffer, " "); + break; + case '%': sbuf_concat (buffer, "%"); break; |