Commit Diff


commit - 793e584b399e4461bfe196c73d47ea33d696429a
commit + f4f1270d6a973dd64747999e64f42642f9728c85
blob - 526d1072e8bdfcec764ebefffb835b6f1014336d
blob + 0acc85f1ffb1bd74b78377df58003831bf306669
--- mymenu.1
+++ mymenu.1
@@ -161,7 +161,7 @@ could be supplied. In addition to it, some special val
 .Bl -tag
 .It start
 Alias for 0;
-.It middle
+.It middle or center
 Compute the correct value to make sure that mymenu will be
 horizontally centered;
 .It end
@@ -171,7 +171,7 @@ aligned.
 .It MyMenu.y
 The Y coordinate of the topmost left corner of the window. Like the X
 coordinate a pixel dimension, percentage dimension or the special
-value "start", "middle", "end" could be supplied.
+value "start", "middle"/"center", "end" could be supplied.
 .It MyMenu.border.size
 A list of number separated by spaces to specify the border of the
 window. The field is parsed like some CSS properties (i.e. padding),
blob - 9e543d47d2a02d3e7af5bae0bbf428a2e617dca2
blob + b90e5bd093cc36c2ecc50d67aa0c9f8bf6aa7626
--- mymenu.1.md
+++ mymenu.1.md
@@ -238,7 +238,7 @@ MyMenu.x
 
 > > Alias for 0;
 
-> middle
+> middle or center
 
 > > Compute the correct value to make sure that mymenu will be
 > > horizontally centered;
@@ -252,7 +252,7 @@ MyMenu.y
 
 > The Y coordinate of the topmost left corner of the window. Like the X
 > coordinate a pixel dimension, percentage dimension or the special
-> value "start", "middle", "end" could be supplied.
+> value "start", "middle"/"center", "end" could be supplied.
 
 MyMenu.border.size
 
@@ -456,4 +456,4 @@ Omar Polo <omar.polo@europecom.net>
 	height of the window, remember to override the x and y coordinates as
 	well.
 
-OpenBSD 6.4 - October 17, 2018
+Void Linux - October 18, 2019
blob - b1ca5bebfe22066876f87458f66bdf95d8bb9cac
blob + 12f6a734d189c4da99262175e21c6126bc0cb8ee
--- mymenu.c
+++ mymenu.c
@@ -1036,7 +1036,7 @@ parse_int_with_pos(const char *str, int default_value,
 {
 	if (!strcmp(str, "start"))
 		return 0;
-	if (!strcmp(str, "middle"))
+	if (!strcmp(str, "middle") || !strcmp(str, "center"))
 		return (max - self) / 2;
 	if (!strcmp(str, "end"))
 		return max - self;