Permalink
Browse files

Add +R for region index to bar formatting.

  • Loading branch information...
Mike Meyer authored and LordReg committed Apr 29, 2017
1 parent 22167bc commit 79d583b79129fd84b7eb8b9b1c48d42930661903
Showing with 4 additions and 0 deletions.
  1. +1 −0 spectrwm.1
  2. +3 −0 spectrwm.c
View
@@ -215,6 +215,7 @@ It may contain the following character sequences:
.It Li "+M" Ta "Number of iconic (minimized) windows in workspace"
.It Li "+N" Ta "Screen number"
.It Li "+P" Ta "Window class and instance separated by a colon"
.It Li "+R" Ta "Region index"
.It Li "+S" Ta "Stacking algorithm"
.It Li "+T" Ta "Window instance (from WM_CLASS)"
.It Li "+U" Ta "Urgency hint"
View
@@ -2580,6 +2580,9 @@ bar_replace_seq(char *fmt, char *fmtrep, struct swm_region *r, size_t *offrep,
case 'P':
bar_window_class_instance(tmp, sizeof tmp, r);
break;
case 'R':
snprintf(tmp, sizeof tmp, "%d", get_region_index(r));
break;
case 'S':
snprintf(tmp, sizeof tmp, "%s", r->ws->stacker);
break;

0 comments on commit 79d583b

Please sign in to comment.