mirror of
				https://github.com/swaywm/sway.git
				synced 2025-10-29 05:40:18 -04:00 
			
		
		
		
	swaybar: complete barconfig_update event handling
This adds complete support for the barconfig_update ipc event. This also changes the bar command and subcommand handlers to correctly emit the event. This makes it so all bar subcommands other than id and swaybar_command are dynamically changeable at runtime. sway-bar.5 has been updated accordingly
This commit is contained in:
		
							parent
							
								
									187306640b
								
							
						
					
					
						commit
						1fd2c6ba49
					
				
					 15 changed files with 412 additions and 321 deletions
				
			
		|  | @ -41,6 +41,7 @@ struct swaybar { | |||
| 	int ipc_socketfd; | ||||
| 
 | ||||
| 	struct wl_list outputs; // swaybar_output::link
 | ||||
| 	struct wl_list unused_outputs; // swaybar_output::link
 | ||||
| 	struct wl_list seats; // swaybar_seat::link
 | ||||
| 
 | ||||
| #if HAVE_TRAY | ||||
|  | @ -109,4 +110,8 @@ void set_bar_dirty(struct swaybar *bar); | |||
| bool determine_bar_visibility(struct swaybar *bar, bool moving_layer); | ||||
| void free_workspaces(struct wl_list *list); | ||||
| 
 | ||||
| void status_in(int fd, short mask, void *data); | ||||
| 
 | ||||
| void destroy_layer_surface(struct swaybar_output *output); | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
|  | @ -16,7 +16,6 @@ struct box_colors { | |||
| struct config_output { | ||||
| 	struct wl_list link; // swaybar_config::outputs
 | ||||
| 	char *name; | ||||
| 	size_t index; | ||||
| }; | ||||
| 
 | ||||
| struct swaybar_binding { | ||||
|  | @ -41,7 +40,6 @@ struct swaybar_config { | |||
| 	bool workspace_buttons; | ||||
| 	list_t *bindings; | ||||
| 	struct wl_list outputs; // config_output::link
 | ||||
| 	bool all_outputs; | ||||
| 	int height; | ||||
| 	int status_padding; | ||||
| 	int status_edge_padding; | ||||
|  | @ -83,10 +81,13 @@ struct tray_binding { | |||
| 	char *command; | ||||
| 	struct wl_list link; // struct tray_binding::link
 | ||||
| }; | ||||
| 
 | ||||
| void free_tray_binding(struct tray_binding *binding); | ||||
| #endif | ||||
| 
 | ||||
| struct swaybar_config *init_config(void); | ||||
| void free_config(struct swaybar_config *config); | ||||
| uint32_t parse_position(const char *position); | ||||
| void free_binding(struct swaybar_binding *binding); | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brian Ashworth
						Brian Ashworth