|
|
@ -39,6 +39,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
|
|
|
|
TO_COLOR_BORDER_BOTTOM,
|
|
|
|
TO_COLOR_BORDER_BOTTOM,
|
|
|
|
TO_COLOR_BUTTON,
|
|
|
|
TO_COLOR_BUTTON,
|
|
|
|
TO_COLOR_TEXT,
|
|
|
|
TO_COLOR_TEXT,
|
|
|
|
|
|
|
|
TO_COLOR_BUTTON_TEXT,
|
|
|
|
TO_THICK_BAR_BORDER,
|
|
|
|
TO_THICK_BAR_BORDER,
|
|
|
|
TO_PADDING_MESSAGE,
|
|
|
|
TO_PADDING_MESSAGE,
|
|
|
|
TO_THICK_DET_BORDER,
|
|
|
|
TO_THICK_DET_BORDER,
|
|
|
@ -72,6 +73,7 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
|
|
|
|
{"border-bottom", required_argument, NULL, TO_COLOR_BORDER_BOTTOM},
|
|
|
|
{"border-bottom", required_argument, NULL, TO_COLOR_BORDER_BOTTOM},
|
|
|
|
{"button-background", required_argument, NULL, TO_COLOR_BUTTON},
|
|
|
|
{"button-background", required_argument, NULL, TO_COLOR_BUTTON},
|
|
|
|
{"text", required_argument, NULL, TO_COLOR_TEXT},
|
|
|
|
{"text", required_argument, NULL, TO_COLOR_TEXT},
|
|
|
|
|
|
|
|
{"button-text", required_argument, NULL, TO_COLOR_BUTTON_TEXT},
|
|
|
|
{"border-bottom-size", required_argument, NULL, TO_THICK_BAR_BORDER},
|
|
|
|
{"border-bottom-size", required_argument, NULL, TO_THICK_BAR_BORDER},
|
|
|
|
{"message-padding", required_argument, NULL, TO_PADDING_MESSAGE},
|
|
|
|
{"message-padding", required_argument, NULL, TO_PADDING_MESSAGE},
|
|
|
|
{"details-border-size", required_argument, NULL, TO_THICK_DET_BORDER},
|
|
|
|
{"details-border-size", required_argument, NULL, TO_THICK_DET_BORDER},
|
|
|
@ -97,33 +99,34 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
|
|
|
|
"Multiple buttons can be defined.\n"
|
|
|
|
"Multiple buttons can be defined.\n"
|
|
|
|
" -Z, --button-dismiss-no-terminal <text> <action> Like "
|
|
|
|
" -Z, --button-dismiss-no-terminal <text> <action> Like "
|
|
|
|
"--button-dismiss, but does not run the action in a terminal.\n"
|
|
|
|
"--button-dismiss, but does not run the action in a terminal.\n"
|
|
|
|
" -c, --config <path> Path to config file.\n"
|
|
|
|
" -c, --config <path> Path to config file.\n"
|
|
|
|
" -d, --debug Enable debugging.\n"
|
|
|
|
" -d, --debug Enable debugging.\n"
|
|
|
|
" -e, --edge top|bottom Set the edge to use.\n"
|
|
|
|
" -e, --edge top|bottom Set the edge to use.\n"
|
|
|
|
" -f, --font <font> Set the font to use.\n"
|
|
|
|
" -f, --font <font> Set the font to use.\n"
|
|
|
|
" -h, --help Show help message and quit.\n"
|
|
|
|
" -h, --help Show help message and quit.\n"
|
|
|
|
" -l, --detailed-message Read a detailed message from stdin.\n"
|
|
|
|
" -l, --detailed-message Read a detailed message from stdin.\n"
|
|
|
|
" -L, --detailed-button <text> Set the text of the detail button.\n"
|
|
|
|
" -L, --detailed-button <text> Set the text of the detail button.\n"
|
|
|
|
" -m, --message <msg> Set the message text.\n"
|
|
|
|
" -m, --message <msg> Set the message text.\n"
|
|
|
|
" -o, --output <output> Set the output to use.\n"
|
|
|
|
" -o, --output <output> Set the output to use.\n"
|
|
|
|
" -s, --dismiss-button <text> Set the dismiss button text.\n"
|
|
|
|
" -s, --dismiss-button <text> Set the dismiss button text.\n"
|
|
|
|
" -t, --type <type> Set the message type.\n"
|
|
|
|
" -t, --type <type> Set the message type.\n"
|
|
|
|
" -v, --version Show the version number and quit.\n"
|
|
|
|
" -v, --version Show the version number and quit.\n"
|
|
|
|
"\n"
|
|
|
|
"\n"
|
|
|
|
"The following appearance options can also be given:\n"
|
|
|
|
"The following appearance options can also be given:\n"
|
|
|
|
" --background RRGGBB[AA] Background color.\n"
|
|
|
|
" --background RRGGBB[AA] Background color.\n"
|
|
|
|
" --border RRGGBB[AA] Border color.\n"
|
|
|
|
" --border RRGGBB[AA] Border color.\n"
|
|
|
|
" --border-bottom RRGGBB[AA] Bottom border color.\n"
|
|
|
|
" --border-bottom RRGGBB[AA] Bottom border color.\n"
|
|
|
|
" --button-background RRGGBB[AA] Button background color.\n"
|
|
|
|
" --button-background RRGGBB[AA] Button background color.\n"
|
|
|
|
" --text RRGGBB[AA] Text color.\n"
|
|
|
|
" --text RRGGBB[AA] Text color.\n"
|
|
|
|
" --border-bottom-size size Thickness of the bar border.\n"
|
|
|
|
" --button-text RRGGBB[AA] Button text color.\n"
|
|
|
|
" --message-padding padding Padding for the message.\n"
|
|
|
|
" --border-bottom-size size Thickness of the bar border.\n"
|
|
|
|
" --details-border-size size Thickness for the details border.\n"
|
|
|
|
" --message-padding padding Padding for the message.\n"
|
|
|
|
" --button-border-size size Thickness for the button border.\n"
|
|
|
|
" --details-border-size size Thickness for the details border.\n"
|
|
|
|
" --button-gap gap Size of the gap between buttons\n"
|
|
|
|
" --button-border-size size Thickness for the button border.\n"
|
|
|
|
" --button-dismiss-gap gap Size of the gap for dismiss button.\n"
|
|
|
|
" --button-gap gap Size of the gap between buttons\n"
|
|
|
|
" --button-margin-right margin Margin from dismiss button to edge.\n"
|
|
|
|
" --button-dismiss-gap gap Size of the gap for dismiss button.\n"
|
|
|
|
" --button-padding padding Padding for the button text.\n";
|
|
|
|
" --button-margin-right margin Margin from dismiss button to edge.\n"
|
|
|
|
|
|
|
|
" --button-padding padding Padding for the button text.\n";
|
|
|
|
|
|
|
|
|
|
|
|
optind = 1;
|
|
|
|
optind = 1;
|
|
|
|
while (1) {
|
|
|
|
while (1) {
|
|
|
@ -255,6 +258,11 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag,
|
|
|
|
fprintf(stderr, "Invalid text color: %s", optarg);
|
|
|
|
fprintf(stderr, "Invalid text color: %s", optarg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TO_COLOR_BUTTON_TEXT: // Button text color
|
|
|
|
|
|
|
|
if (type && !parse_color(optarg, &type->button_text)) {
|
|
|
|
|
|
|
|
fprintf(stderr, "Invalid button text color: %s", optarg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case TO_THICK_BAR_BORDER: // Bottom border thickness
|
|
|
|
case TO_THICK_BAR_BORDER: // Bottom border thickness
|
|
|
|
if (type) {
|
|
|
|
if (type) {
|
|
|
|
type->bar_border_thickness = strtol(optarg, NULL, 0);
|
|
|
|
type->bar_border_thickness = strtol(optarg, NULL, 0);
|
|
|
|