diff options
author | D.B <thejan.2009@gmail.com> | 2016-11-02 18:48:43 +0100 |
---|---|---|
committer | D.B <thejan.2009@gmail.com> | 2016-11-02 18:58:33 +0100 |
commit | ad4d21d60b36ba39e2090fa052a29bf7ea8a3395 (patch) | |
tree | 84cb01165960555dbc64cd8aa57137b43ff65655 /include | |
parent | use urgent_ws color in swaybar if binding_mode is undefined (diff) | |
download | sway-ad4d21d60b36ba39e2090fa052a29bf7ea8a3395.tar.gz sway-ad4d21d60b36ba39e2090fa052a29bf7ea8a3395.tar.zst sway-ad4d21d60b36ba39e2090fa052a29bf7ea8a3395.zip |
add bar colours for focused_(workspace|statusline|separator)
If these aren't defined in config, color settings without 'focused_'
prefix are used as a fallback.
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 4 | ||||
-rw-r--r-- | include/sway/config.h | 7 | ||||
-rw-r--r-- | include/swaybar/bar.h | 2 | ||||
-rw-r--r-- | include/swaybar/config.h | 4 |
4 files changed, 16 insertions, 1 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index a46f41a3..db5e94d9 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -160,12 +160,14 @@ sway_cmd bar_cmd_workspace_buttons; | |||
160 | 160 | ||
161 | sway_cmd bar_colors_cmd_active_workspace; | 161 | sway_cmd bar_colors_cmd_active_workspace; |
162 | sway_cmd bar_colors_cmd_background; | 162 | sway_cmd bar_colors_cmd_background; |
163 | sway_cmd bar_colors_cmd_background; | 163 | sway_cmd bar_colors_cmd_focused_background; |
164 | sway_cmd bar_colors_cmd_binding_mode; | 164 | sway_cmd bar_colors_cmd_binding_mode; |
165 | sway_cmd bar_colors_cmd_focused_workspace; | 165 | sway_cmd bar_colors_cmd_focused_workspace; |
166 | sway_cmd bar_colors_cmd_inactive_workspace; | 166 | sway_cmd bar_colors_cmd_inactive_workspace; |
167 | sway_cmd bar_colors_cmd_separator; | 167 | sway_cmd bar_colors_cmd_separator; |
168 | sway_cmd bar_colors_cmd_focused_separator; | ||
168 | sway_cmd bar_colors_cmd_statusline; | 169 | sway_cmd bar_colors_cmd_statusline; |
170 | sway_cmd bar_colors_cmd_focused_statusline; | ||
169 | sway_cmd bar_colors_cmd_urgent_workspace; | 171 | sway_cmd bar_colors_cmd_urgent_workspace; |
170 | 172 | ||
171 | sway_cmd input_cmd_accel_profile; | 173 | sway_cmd input_cmd_accel_profile; |
diff --git a/include/sway/config.h b/include/sway/config.h index c41bb8b3..9b3cc60c 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -148,6 +148,9 @@ struct bar_config { | |||
148 | char background[10]; | 148 | char background[10]; |
149 | char statusline[10]; | 149 | char statusline[10]; |
150 | char separator[10]; | 150 | char separator[10]; |
151 | char focused_background[10]; | ||
152 | char focused_statusline[10]; | ||
153 | char focused_separator[10]; | ||
151 | char focused_workspace_border[10]; | 154 | char focused_workspace_border[10]; |
152 | char focused_workspace_bg[10]; | 155 | char focused_workspace_bg[10]; |
153 | char focused_workspace_text[10]; | 156 | char focused_workspace_text[10]; |
@@ -164,6 +167,10 @@ struct bar_config { | |||
164 | char binding_mode_bg[10]; | 167 | char binding_mode_bg[10]; |
165 | char binding_mode_text[10]; | 168 | char binding_mode_text[10]; |
166 | 169 | ||
170 | bool has_focused_background; | ||
171 | bool has_focused_statusline; | ||
172 | bool has_focused_separator; | ||
173 | |||
167 | bool has_binding_mode_border; | 174 | bool has_binding_mode_border; |
168 | bool has_binding_mode_bg; | 175 | bool has_binding_mode_bg; |
169 | bool has_binding_mode_text; | 176 | bool has_binding_mode_text; |
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index a3c511d9..697a48c2 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h | |||
@@ -9,6 +9,7 @@ struct bar { | |||
9 | struct config *config; | 9 | struct config *config; |
10 | struct status_line *status; | 10 | struct status_line *status; |
11 | list_t *outputs; | 11 | list_t *outputs; |
12 | struct output *focused_output; | ||
12 | 13 | ||
13 | int ipc_event_socketfd; | 14 | int ipc_event_socketfd; |
14 | int ipc_socketfd; | 15 | int ipc_socketfd; |
@@ -22,6 +23,7 @@ struct output { | |||
22 | list_t *workspaces; | 23 | list_t *workspaces; |
23 | char *name; | 24 | char *name; |
24 | int idx; | 25 | int idx; |
26 | bool focused; | ||
25 | }; | 27 | }; |
26 | 28 | ||
27 | struct workspace { | 29 | struct workspace { |
diff --git a/include/swaybar/config.h b/include/swaybar/config.h index 934116ca..04b12cd4 100644 --- a/include/swaybar/config.h +++ b/include/swaybar/config.h | |||
@@ -40,6 +40,10 @@ struct config { | |||
40 | uint32_t statusline; | 40 | uint32_t statusline; |
41 | uint32_t separator; | 41 | uint32_t separator; |
42 | 42 | ||
43 | uint32_t focused_background; | ||
44 | uint32_t focused_statusline; | ||
45 | uint32_t focused_separator; | ||
46 | |||
43 | struct box_colors focused_workspace; | 47 | struct box_colors focused_workspace; |
44 | struct box_colors active_workspace; | 48 | struct box_colors active_workspace; |
45 | struct box_colors inactive_workspace; | 49 | struct box_colors inactive_workspace; |