Skip to content

Commit

Permalink
Merge pull request #87 from hpdeifel/center-position
Browse files Browse the repository at this point in the history
Add center position for notifications
  • Loading branch information
emersion authored Oct 25, 2018
2 parents 1d39e12 + ff77148 commit 9f66c5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,16 @@ static bool apply_config_option(struct mako_config *config, const char *name,
} else if (strcmp(value, "bottom-right") == 0) {
config->anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
} else if (strcmp(value, "bottom-center") == 0) {
config->anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
} else if (strcmp(value, "bottom-left") == 0) {
config->anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT;
} else if (strcmp(value, "top-left") == 0) {
config->anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT;
} else if (strcmp(value, "top-center") == 0) {
config->anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP;
} else {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static const char usage[] =
" --max-visible <n> Max number of visible notifications.\n"
" --default-timeout <timeout> Default timeout in milliseconds.\n"
" --output <name> Show notifications on this output.\n"
" --anchor <corner> Corner of output to put notifications.\n"
" --anchor <position> Position on output to put notifications.\n"
"\n"
"Colors can be specified with the format #RRGGBB or #RRGGBBAA.\n";

Expand Down
7 changes: 4 additions & 3 deletions mako.1.scd
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ dismissed with a click or via *makoctl*(1).

Default: ""

*--anchor* _corner_
Show notifications in the specified corner of the output. Supported values
are _top-right_, _bottom-right_, _bottom-left_ and _top-left_.
*--anchor* _position_
Show notifications at the specified position on the output. Supported values
are _top-right_, _bottom-right_, _bottom-center_, _bottom-left_, _top-left_
and _top-center_.

Default: _top-right_

Expand Down

0 comments on commit 9f66c5b

Please sign in to comment.