aboutsummaryrefslogtreecommitdiff
path: root/i3bar
diff options
context:
space:
mode:
authorOrestis Floros <orestisflo@gmail.com>2020-04-14 20:46:49 +0200
committerOrestis Floros <orestisflo@gmail.com>2020-04-14 20:46:49 +0200
commit4212fb6488578e332a5f3cad2819beedb0ff7ae5 (patch)
tree6da2b56a7be0b0b87c275523a1f04056a4733230 /i3bar
parente7191af8b398e42264551d6caf5e1f68ed436c81 (diff)
downloadi3-4212fb6488578e332a5f3cad2819beedb0ff7ae5.tar.gz
i3-4212fb6488578e332a5f3cad2819beedb0ff7ae5.zip
i3bar: Set WM_CLASS instance to bar_id
Diffstat (limited to 'i3bar')
-rw-r--r--i3bar/src/xcb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c
index 06cff98d..ae447fbc 100644
--- a/i3bar/src/xcb.c
+++ b/i3bar/src/xcb.c
@@ -1816,6 +1816,8 @@ void reconfig_windows(bool redraw_bars) {
bar_height);
/* Set the WM_CLASS and WM_NAME (we don't need UTF-8) atoms */
+ char *class;
+ int len = sasprintf(&class, "%s%ci3bar%c", config.bar_id, 0, 0);
xcb_void_cookie_t class_cookie;
class_cookie = xcb_change_property(xcb_connection,
XCB_PROP_MODE_REPLACE,
@@ -1823,8 +1825,8 @@ void reconfig_windows(bool redraw_bars) {
XCB_ATOM_WM_CLASS,
XCB_ATOM_STRING,
8,
- (strlen("i3bar") + 1) * 2,
- "i3bar\0i3bar\0");
+ len,
+ class);
char *name;
sasprintf(&name, "i3bar for output %s", walk->name);