aboutsummaryrefslogtreecommitdiffstats
path: root/include/swaynag
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-07-29 22:42:03 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-08-01 22:47:54 -0400
commite01acb6097b583fcf2f6d0e0afe1bd878dd9b683 (patch)
treecf3e715870bb22d9ef7d5bee9457fdcc70e31ee2 /include/swaynag
parentswaynag: add math to meson.build (diff)
downloadsway-e01acb6097b583fcf2f6d0e0afe1bd878dd9b683.tar.gz
sway-e01acb6097b583fcf2f6d0e0afe1bd878dd9b683.tar.zst
sway-e01acb6097b583fcf2f6d0e0afe1bd878dd9b683.zip
swaynag: allow more config options
Diffstat (limited to 'include/swaynag')
-rw-r--r--include/swaynag/config.h2
-rw-r--r--include/swaynag/swaynag.h11
-rw-r--r--include/swaynag/types.h18
3 files changed, 17 insertions, 14 deletions
diff --git a/include/swaynag/config.h b/include/swaynag/config.h
index 3fd5b3ce..0d8889de 100644
--- a/include/swaynag/config.h
+++ b/include/swaynag/config.h
@@ -4,7 +4,7 @@
4#include "list.h" 4#include "list.h"
5 5
6int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag, 6int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
7 list_t *types, char **config, bool *debug); 7 list_t *types, struct swaynag_type *type, char **config, bool *debug);
8 8
9char *swaynag_get_config_path(void); 9char *swaynag_get_config_path(void);
10 10
diff --git a/include/swaynag/swaynag.h b/include/swaynag/swaynag.h
index 6a56f14f..dd6fe0cd 100644
--- a/include/swaynag/swaynag.h
+++ b/include/swaynag/swaynag.h
@@ -7,15 +7,6 @@
7#include "swaynag/types.h" 7#include "swaynag/types.h"
8#include "xdg-output-unstable-v1-client-protocol.h" 8#include "xdg-output-unstable-v1-client-protocol.h"
9 9
10#define SWAYNAG_BAR_BORDER_THICKNESS 2
11#define SWAYNAG_MESSAGE_PADDING 8
12#define SWAYNAG_DETAILS_BORDER_THICKNESS 3
13#define SWAYNAG_BUTTON_BORDER_THICKNESS 3
14#define SWAYNAG_BUTTON_GAP 20
15#define SWAYNAG_BUTTON_GAP_CLOSE 15
16#define SWAYNAG_BUTTON_MARGIN_RIGHT 2
17#define SWAYNAG_BUTTON_PADDING 3
18
19#define SWAYNAG_MAX_HEIGHT 500 10#define SWAYNAG_MAX_HEIGHT 500
20 11
21enum swaynag_action_type { 12enum swaynag_action_type {
@@ -88,9 +79,7 @@ struct swaynag {
88 struct pool_buffer *current_buffer; 79 struct pool_buffer *current_buffer;
89 80
90 struct swaynag_type *type; 81 struct swaynag_type *type;
91 uint32_t anchors;
92 char *message; 82 char *message;
93 char *font;
94 list_t *buttons; 83 list_t *buttons;
95 struct swaynag_details details; 84 struct swaynag_details details;
96}; 85};
diff --git a/include/swaynag/types.h b/include/swaynag/types.h
index af83bd83..2183ce22 100644
--- a/include/swaynag/types.h
+++ b/include/swaynag/types.h
@@ -3,11 +3,25 @@
3 3
4struct swaynag_type { 4struct swaynag_type {
5 char *name; 5 char *name;
6
7 char *font;
8 char *output;
9 uint32_t anchors;
10
6 uint32_t button_background; 11 uint32_t button_background;
7 uint32_t background; 12 uint32_t background;
8 uint32_t text; 13 uint32_t text;
9 uint32_t border; 14 uint32_t border;
10 uint32_t border_bottom; 15 uint32_t border_bottom;
16
17 uint32_t bar_border_thickness;
18 uint32_t message_padding;
19 uint32_t details_border_thickness;
20 uint32_t button_border_thickness;
21 uint32_t button_gap;
22 uint32_t button_gap_close;
23 uint32_t button_margin_right;
24 uint32_t button_padding;
11}; 25};
12 26
13void swaynag_types_add_default(list_t *types); 27void swaynag_types_add_default(list_t *types);
@@ -16,10 +30,10 @@ struct swaynag_type *swaynag_type_get(list_t *types, char *name);
16 30
17struct swaynag_type *swaynag_type_clone(struct swaynag_type *type); 31struct swaynag_type *swaynag_type_clone(struct swaynag_type *type);
18 32
33void swaynag_type_merge(struct swaynag_type *dest, struct swaynag_type *src);
34
19void swaynag_type_free(struct swaynag_type *type); 35void swaynag_type_free(struct swaynag_type *type);
20 36
21void swaynag_types_free(list_t *types); 37void swaynag_types_free(list_t *types);
22 38
23int swaynag_parse_type(int argc, char **argv, struct swaynag_type *type);
24
25#endif 39#endif