aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/ipc.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-07-17 11:26:38 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-07-17 11:26:38 -0400
commit3bb880bf207b40bc0cddcb9c449a738861e6791b (patch)
tree66ed13164fef27ebf3c8a6106590f1b7ec432483 /swaybar/ipc.c
parentAllow users to customize the cursor on clients (diff)
downloadsway-3bb880bf207b40bc0cddcb9c449a738861e6791b.tar.gz
sway-3bb880bf207b40bc0cddcb9c449a738861e6791b.tar.zst
sway-3bb880bf207b40bc0cddcb9c449a738861e6791b.zip
Implement configurable wrapping on bar ws scroll
Diffstat (limited to 'swaybar/ipc.c')
-rw-r--r--swaybar/ipc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index 15f40508..ad4f9ef8 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -19,7 +19,7 @@ void ipc_send_workspace_command(const char *workspace_name) {
19static void ipc_parse_config(struct config *config, const char *payload) { 19static void ipc_parse_config(struct config *config, const char *payload) {
20 json_object *bar_config = json_tokener_parse(payload); 20 json_object *bar_config = json_tokener_parse(payload);
21 json_object *tray_output, *mode, *hidden_bar, *position, *status_command; 21 json_object *tray_output, *mode, *hidden_bar, *position, *status_command;
22 json_object *font, *bar_height, *workspace_buttons, *strip_workspace_numbers; 22 json_object *font, *bar_height, *wrap_scroll, *workspace_buttons, *strip_workspace_numbers;
23 json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol, *outputs; 23 json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol, *outputs;
24 json_object *markup; 24 json_object *markup;
25 json_object_object_get_ex(bar_config, "tray_output", &tray_output); 25 json_object_object_get_ex(bar_config, "tray_output", &tray_output);
@@ -29,6 +29,7 @@ static void ipc_parse_config(struct config *config, const char *payload) {
29 json_object_object_get_ex(bar_config, "status_command", &status_command); 29 json_object_object_get_ex(bar_config, "status_command", &status_command);
30 json_object_object_get_ex(bar_config, "font", &font); 30 json_object_object_get_ex(bar_config, "font", &font);
31 json_object_object_get_ex(bar_config, "bar_height", &bar_height); 31 json_object_object_get_ex(bar_config, "bar_height", &bar_height);
32 json_object_object_get_ex(bar_config, "wrap_scroll", &wrap_scroll);
32 json_object_object_get_ex(bar_config, "workspace_buttons", &workspace_buttons); 33 json_object_object_get_ex(bar_config, "workspace_buttons", &workspace_buttons);
33 json_object_object_get_ex(bar_config, "strip_workspace_numbers", &strip_workspace_numbers); 34 json_object_object_get_ex(bar_config, "strip_workspace_numbers", &strip_workspace_numbers);
34 json_object_object_get_ex(bar_config, "binding_mode_indicator", &binding_mode_indicator); 35 json_object_object_get_ex(bar_config, "binding_mode_indicator", &binding_mode_indicator);
@@ -65,6 +66,10 @@ static void ipc_parse_config(struct config *config, const char *payload) {
65 config->binding_mode_indicator = json_object_get_boolean(binding_mode_indicator); 66 config->binding_mode_indicator = json_object_get_boolean(binding_mode_indicator);
66 } 67 }
67 68
69 if (wrap_scroll) {
70 config->wrap_scroll = json_object_get_boolean(wrap_scroll);
71 }
72
68 if (workspace_buttons) { 73 if (workspace_buttons) {
69 config->workspace_buttons = json_object_get_boolean(workspace_buttons); 74 config->workspace_buttons = json_object_get_boolean(workspace_buttons);
70 } 75 }