summaryrefslogtreecommitdiffstats
path: root/include/swaybar/config.h
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2018-10-12 20:32:48 +0100
committerLibravatar Ian Fan <ianfan0@gmail.com>2018-10-14 13:33:12 +0100
commitbcc61e5147fb57a3b4bfb9a2a33065a0cf6da67b (patch)
tree873a09eca473242c15299ea1053966e9d163f6c6 /include/swaybar/config.h
parentswaybar: streamline ipc handling (diff)
downloadsway-bcc61e5147fb57a3b4bfb9a2a33065a0cf6da67b.tar.gz
sway-bcc61e5147fb57a3b4bfb9a2a33065a0cf6da67b.tar.zst
sway-bcc61e5147fb57a3b4bfb9a2a33065a0cf6da67b.zip
swaybar: handle mode/hidden_state changes
As well as adding the hidden_state property to the bar config struct, this commit handles barconfig_update events when the mode or hidden_state changes, and uses a new function determine_bar_visibility to hide or show the bar as required, using, respectively, destroy_layer_surface, which is also newly added, and add_layer_surface, which has been changed to allow dynamically adding the surface.
Diffstat (limited to 'include/swaybar/config.h')
-rw-r--r--include/swaybar/config.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/swaybar/config.h b/include/swaybar/config.h
index 68ee2087..10904bca 100644
--- a/include/swaybar/config.h
+++ b/include/swaybar/config.h
@@ -31,6 +31,7 @@ struct swaybar_config {
31 char *font; 31 char *font;
32 char *sep_symbol; 32 char *sep_symbol;
33 char *mode; 33 char *mode;
34 char *hidden_state;
34 bool strip_workspace_numbers; 35 bool strip_workspace_numbers;
35 bool binding_mode_indicator; 36 bool binding_mode_indicator;
36 bool wrap_scroll; 37 bool wrap_scroll;