summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2004-05-20 05:23:02 +0000
committersabetts <sabetts>2004-05-20 05:23:02 +0000
commit6f0409e582148c7611133cb1116c934ff312b204 (patch)
tree450e445a0c4241b01adb6835d55ce3a615b551a9 /src
parentf8ad8356936498a6ade16bc5d55ea6af4c1e33bc (diff)
downloadratpoison-6f0409e582148c7611133cb1116c934ff312b204.zip
(format_window_name): add %f format option
Diffstat (limited to 'src')
-rw-r--r--src/window.c12
1 files changed, 11 insertions, 1 deletions
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;