diff options
author | Mustafa Abdul-Kader <[email protected]> | 2020-09-08 21:43:35 -0500 |
---|---|---|
committer | Brian Ashworth <[email protected]> | 2020-09-14 22:13:01 -0400 |
commit | eb1c09030ece6fcf0c6b387c8b74ded106eccecb (patch) | |
tree | 6ce8c1b8991a5dc6b3be88415b903c9ff8ab9033 /swaynag/config.c | |
parent | afa890e8e9f10667a56e896a114bf81fbc3ff54a (diff) |
swaynag: add details background option
Adds a new config option for details background for swaynag
issue/#5673
Diffstat (limited to 'swaynag/config.c')
-rw-r--r-- | swaynag/config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/swaynag/config.c b/swaynag/config.c index 3488a74d..a57597ef 100644 --- a/swaynag/config.c +++ b/swaynag/config.c @@ -38,6 +38,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag, TO_COLOR_BORDER, TO_COLOR_BORDER_BOTTOM, TO_COLOR_BUTTON, + TO_COLOR_DETAILS, TO_COLOR_TEXT, TO_COLOR_BUTTON_TEXT, TO_THICK_BAR_BORDER, @@ -77,6 +78,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag, {"border-bottom-size", required_argument, NULL, TO_THICK_BAR_BORDER}, {"message-padding", required_argument, NULL, TO_PADDING_MESSAGE}, {"details-border-size", required_argument, NULL, TO_THICK_DET_BORDER}, + {"details-background", required_argument, NULL, TO_COLOR_DETAILS}, {"button-border-size", required_argument, NULL, TO_THICK_BTN_BORDER}, {"button-gap", required_argument, NULL, TO_GAP_BTN}, {"button-dismiss-gap", required_argument, NULL, TO_GAP_BTN_DISMISS}, @@ -122,6 +124,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag, " --border-bottom-size size Thickness of the bar border.\n" " --message-padding padding Padding for the message.\n" " --details-border-size size Thickness for the details border.\n" + " --details-background RRGGBB[AA] Details background color.\n" " --button-border-size size Thickness for the button border.\n" " --button-gap gap Size of the gap between buttons\n" " --button-dismiss-gap gap Size of the gap for dismiss button.\n" @@ -253,6 +256,11 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag, fprintf(stderr, "Invalid button background color: %s", optarg); } break; + case TO_COLOR_DETAILS: // Details background color + if (type && !parse_color(optarg, &type->details_background)) { + fprintf(stderr, "Invalid details background color: %s", optarg); + } + break; case TO_COLOR_TEXT: // Text color if (type && !parse_color(optarg, &type->text)) { fprintf(stderr, "Invalid text color: %s", optarg); |