summaryrefslogtreecommitdiff
path: root/swaybar/status_line.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2018-10-14 15:13:50 +0200
committerGitHub <[email protected]>2018-10-14 15:13:50 +0200
commit4a05fbf8ab364657763b1d1058bdf9b4c2727b76 (patch)
treec405121528d191ba74fe329fdb18093810d9b73c /swaybar/status_line.c
parentabde9d6627483256ccfd20bdeeaa52d7790b0426 (diff)
parent85dd36e92b2fb3d4b5fefa36927abf8f35f84c5c (diff)
Merge pull request #2751 from ianyfan/swaybar
Bar mode/hidden_state events
Diffstat (limited to 'swaybar/status_line.c')
-rw-r--r--swaybar/status_line.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index ed6dc7c8..000609ce 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -83,6 +83,17 @@ bool status_handle_readable(struct status_line *status) {
return true;
}
}
+
+ json_object *signal;
+ if (json_object_object_get_ex(header, "stop_signal", &signal)) {
+ status->stop_signal = json_object_get_int(signal);
+ wlr_log(WLR_DEBUG, "Setting stop signal to %d", status->stop_signal);
+ }
+ if (json_object_object_get_ex(header, "cont_signal", &signal)) {
+ status->cont_signal = json_object_get_int(signal);
+ wlr_log(WLR_DEBUG, "Setting cont signal to %d", status->cont_signal);
+ }
+
json_object_put(header);
wl_list_init(&status->blocks);
@@ -121,6 +132,9 @@ bool status_handle_readable(struct status_line *status) {
struct status_line *status_line_init(char *cmd) {
struct status_line *status = calloc(1, sizeof(struct status_line));
+ status->stop_signal = SIGSTOP;
+ status->cont_signal = SIGCONT;
+
status->buffer_size = 8192;
status->buffer = malloc(status->buffer_size);