mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Configure border and titlebar color per app by using window rules
Signed-off-by: dmitry-erin <dmitry.erin@unikie.com>
This commit is contained in:
parent
7e60c57b81
commit
2cf0a85c45
10 changed files with 207 additions and 102 deletions
|
|
@ -129,7 +129,7 @@ add_toggled_icon(struct wl_list *part_list, enum ssd_part_type type,
|
|||
struct ssd_part *add_scene_button_corner(
|
||||
struct wl_list *part_list, enum ssd_part_type type,
|
||||
enum ssd_part_type corner_type, struct wlr_scene_tree *parent,
|
||||
struct wlr_buffer *corner_buffer, struct wlr_buffer *icon_buffer,
|
||||
float *bg_color, struct wlr_buffer *corner_buffer, struct wlr_buffer *icon_buffer,
|
||||
struct wlr_buffer *hover_buffer, int x, struct view *view);
|
||||
|
||||
/* SSD internal helpers */
|
||||
|
|
|
|||
|
|
@ -128,4 +128,13 @@ void theme_init(struct theme *theme, const char *theme_name);
|
|||
*/
|
||||
void theme_finish(struct theme *theme);
|
||||
|
||||
void theme_parse_hexstr(const char *hex, float *rgba);
|
||||
|
||||
/**
|
||||
* get_theme_for_view - get theme with check for custom color
|
||||
* @view: view data
|
||||
* @return: theme struct with color customization
|
||||
*/
|
||||
struct theme get_theme_for_view(struct view *view);
|
||||
|
||||
#endif /* LABWC_THEME_H */
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ enum property {
|
|||
* - 'app_id' for native Wayland windows
|
||||
* - 'WM_CLASS' for XWayland clients
|
||||
*/
|
||||
|
||||
struct window_rule {
|
||||
char *identifier;
|
||||
char *title;
|
||||
|
|
@ -33,6 +34,10 @@ struct window_rule {
|
|||
enum property fixed_position;
|
||||
|
||||
struct wl_list link; /* struct rcxml.window_rules */
|
||||
|
||||
/* Customisation window title and borders*/
|
||||
bool has_custom_border;
|
||||
float custom_border_color[4];
|
||||
};
|
||||
|
||||
struct view;
|
||||
|
|
@ -40,4 +45,11 @@ struct view;
|
|||
void window_rules_apply(struct view *view, enum window_rule_event event);
|
||||
enum property window_rules_get_property(struct view *view, const char *property);
|
||||
|
||||
/**
|
||||
* window_rules_get_custom_border_color - check for presence of custom color in window rules
|
||||
* @view: view data
|
||||
* @return: pointer to custom color or NULL if there is no custom color
|
||||
*/
|
||||
float *window_rules_get_custom_border_color(struct view *view);
|
||||
|
||||
#endif /* LABWC_WINDOW_RULES_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue