From d38d2dc3e3454642f8ceaaadeaa0fd8d0b88feea Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Tue, 10 Feb 2015 14:26:22 -0500 Subject: [PATCH] Update bar font config on reload Dynamically update the font when the `reload` command is called by reloading the font with `xcb_init_late` and adjusting the size of the bar by updating the output dimensions with a call to the ipc. --- i3bar/src/ipc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i3bar/src/ipc.c b/i3bar/src/ipc.c index 3eb50beb..e1b343e5 100644 --- a/i3bar/src/ipc.c +++ b/i3bar/src/ipc.c @@ -159,6 +159,9 @@ void got_bar_config_update(char *event) { if (found_id == NULL) return; + /* reconfigure the bar based on the current outputs */ + i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_OUTPUTS, NULL); + free_colors(&(config.colors)); /* update the configuration with the received settings */ @@ -169,6 +172,8 @@ void got_bar_config_update(char *event) { reconfig_windows(true); } + /* update fonts and colors */ + init_xcb_late(config.fontname); init_colors(&(config.colors)); realloc_sl_buffer(); -- 2.39.5