i3bar: Set WM_CLASS instance to bar_id

This commit is contained in:
Orestis Floros 2020-04-14 20:46:49 +02:00
parent e7191af8b3
commit 4212fb6488
No known key found for this signature in database
GPG Key ID: A09DBD7D3222C1C3
1 changed files with 4 additions and 2 deletions

View File

@ -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);