aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/ipc.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-10 23:43:45 -0500
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-11 00:07:58 -0500
commitc0f92cb2fb94ac87396da99646f9219e54b36860 (patch)
treeb03bd387cc1226031230ad5503dcbf7025128e02 /swaybar/ipc.c
parentswaylock: Add caps lock state to indicator (diff)
downloadsway-c0f92cb2fb94ac87396da99646f9219e54b36860.tar.gz
sway-c0f92cb2fb94ac87396da99646f9219e54b36860.tar.zst
sway-c0f92cb2fb94ac87396da99646f9219e54b36860.zip
swaybar: add status_padding command
Adds the bar subcommand `status_padding <padding>` which allows setting the padding used for swaybar. If `status_padding` is set to `0`, blocks will be able to take up the full height of the bar.
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r--swaybar/ipc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index 8e7a542e..77e1b94e 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -157,7 +157,7 @@ static bool ipc_parse_config(
157 json_object *font, *gaps, *bar_height, *wrap_scroll, *workspace_buttons; 157 json_object *font, *gaps, *bar_height, *wrap_scroll, *workspace_buttons;
158 json_object *strip_workspace_numbers, *strip_workspace_name; 158 json_object *strip_workspace_numbers, *strip_workspace_name;
159 json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol; 159 json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol;
160 json_object *outputs, *bindings; 160 json_object *outputs, *bindings, *status_padding;
161 json_object_object_get_ex(bar_config, "mode", &mode); 161 json_object_object_get_ex(bar_config, "mode", &mode);
162 json_object_object_get_ex(bar_config, "hidden_state", &hidden_state); 162 json_object_object_get_ex(bar_config, "hidden_state", &hidden_state);
163 json_object_object_get_ex(bar_config, "position", &position); 163 json_object_object_get_ex(bar_config, "position", &position);
@@ -176,6 +176,7 @@ static bool ipc_parse_config(
176 json_object_object_get_ex(bar_config, "outputs", &outputs); 176 json_object_object_get_ex(bar_config, "outputs", &outputs);
177 json_object_object_get_ex(bar_config, "pango_markup", &markup); 177 json_object_object_get_ex(bar_config, "pango_markup", &markup);
178 json_object_object_get_ex(bar_config, "bindings", &bindings); 178 json_object_object_get_ex(bar_config, "bindings", &bindings);
179 json_object_object_get_ex(bar_config, "status_padding", &status_padding);
179 if (status_command) { 180 if (status_command) {
180 free(config->status_command); 181 free(config->status_command);
181 config->status_command = strdup(json_object_get_string(status_command)); 182 config->status_command = strdup(json_object_get_string(status_command));
@@ -209,6 +210,9 @@ static bool ipc_parse_config(
209 if (bar_height) { 210 if (bar_height) {
210 config->height = json_object_get_int(bar_height); 211 config->height = json_object_get_int(bar_height);
211 } 212 }
213 if (status_padding) {
214 config->status_padding = json_object_get_int(status_padding);
215 }
212 if (gaps) { 216 if (gaps) {
213 json_object *top = json_object_object_get(gaps, "top"); 217 json_object *top = json_object_object_get(gaps, "top");
214 if (top) { 218 if (top) {