mirror of
https://github.com/swaywm/sway.git
synced 2025-11-21 06:59:48 -05:00
swaynag: allow more config options
This commit is contained in:
parent
ca40298af4
commit
e01acb6097
10 changed files with 379 additions and 137 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include "list.h"
|
||||
|
||||
int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
|
||||
list_t *types, char **config, bool *debug);
|
||||
list_t *types, struct swaynag_type *type, char **config, bool *debug);
|
||||
|
||||
char *swaynag_get_config_path(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,15 +7,6 @@
|
|||
#include "swaynag/types.h"
|
||||
#include "xdg-output-unstable-v1-client-protocol.h"
|
||||
|
||||
#define SWAYNAG_BAR_BORDER_THICKNESS 2
|
||||
#define SWAYNAG_MESSAGE_PADDING 8
|
||||
#define SWAYNAG_DETAILS_BORDER_THICKNESS 3
|
||||
#define SWAYNAG_BUTTON_BORDER_THICKNESS 3
|
||||
#define SWAYNAG_BUTTON_GAP 20
|
||||
#define SWAYNAG_BUTTON_GAP_CLOSE 15
|
||||
#define SWAYNAG_BUTTON_MARGIN_RIGHT 2
|
||||
#define SWAYNAG_BUTTON_PADDING 3
|
||||
|
||||
#define SWAYNAG_MAX_HEIGHT 500
|
||||
|
||||
enum swaynag_action_type {
|
||||
|
|
@ -88,9 +79,7 @@ struct swaynag {
|
|||
struct pool_buffer *current_buffer;
|
||||
|
||||
struct swaynag_type *type;
|
||||
uint32_t anchors;
|
||||
char *message;
|
||||
char *font;
|
||||
list_t *buttons;
|
||||
struct swaynag_details details;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,11 +3,25 @@
|
|||
|
||||
struct swaynag_type {
|
||||
char *name;
|
||||
|
||||
char *font;
|
||||
char *output;
|
||||
uint32_t anchors;
|
||||
|
||||
uint32_t button_background;
|
||||
uint32_t background;
|
||||
uint32_t text;
|
||||
uint32_t border;
|
||||
uint32_t border_bottom;
|
||||
|
||||
uint32_t bar_border_thickness;
|
||||
uint32_t message_padding;
|
||||
uint32_t details_border_thickness;
|
||||
uint32_t button_border_thickness;
|
||||
uint32_t button_gap;
|
||||
uint32_t button_gap_close;
|
||||
uint32_t button_margin_right;
|
||||
uint32_t button_padding;
|
||||
};
|
||||
|
||||
void swaynag_types_add_default(list_t *types);
|
||||
|
|
@ -16,10 +30,10 @@ struct swaynag_type *swaynag_type_get(list_t *types, char *name);
|
|||
|
||||
struct swaynag_type *swaynag_type_clone(struct swaynag_type *type);
|
||||
|
||||
void swaynag_type_merge(struct swaynag_type *dest, struct swaynag_type *src);
|
||||
|
||||
void swaynag_type_free(struct swaynag_type *type);
|
||||
|
||||
void swaynag_types_free(list_t *types);
|
||||
|
||||
int swaynag_parse_type(int argc, char **argv, struct swaynag_type *type);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue