forked from speedie/spmenu
add support for overriding minimum width through config
This commit is contained in:
parent
e537aaaf79
commit
2ee1bbc745
|
@ -32,6 +32,7 @@ Miscellanious:
|
|||
|
||||
- spmenu -l, --lines line - Set line count to stdin
|
||||
- spmenu -mh, --lineheight height - Set spmenu line height to height
|
||||
- spmenu -mw, --min-width width - Set minimum width to width
|
||||
- spmenu -g, --columns grid - Set the number of grids to grid
|
||||
- spmenu -gc, --generate-cache - Generate image cache
|
||||
- spmenu -ngc, --no-generate-cache - Don't generate image cache
|
||||
|
|
|
@ -79,7 +79,7 @@ spmenu.casesensitive: 0
|
|||
spmenu.menuposition: 1
|
||||
spmenu.menupaddingv: 0
|
||||
spmenu.menupaddingh: 0
|
||||
spmenu.minwidth: 500
|
||||
spmenu.minwidth: 1000
|
||||
|
||||
!! General
|
||||
spmenu.class: spmenu
|
||||
|
|
|
@ -162,6 +162,8 @@ readargs(int argc, char *argv[])
|
|||
} else if (!strcmp(argv[i], "-mh") || (!strcmp(argv[i], "--lineheight"))) { // line height
|
||||
lineheight += atoi(argv[++i]);
|
||||
if (columns == 0) columns = 1;
|
||||
} else if (!strcmp(argv[i], "-mw") || (!strcmp(argv[i], "--min-width"))) { // line height
|
||||
minwidth = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-lp") || (!strcmp(argv[i], "--vertical-padding"))) { // vertical padding
|
||||
menupaddingv = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-hp") || (!strcmp(argv[i], "--horizontal-padding"))) { // horizontal padding
|
||||
|
@ -335,6 +337,7 @@ usage(void)
|
|||
"- Arguments -\n"
|
||||
"spmenu -l, --lines <line> Set line count to stdin\n"
|
||||
"spmenu -mh, --lineheight <height> Set spmenu line height to <height>\n"
|
||||
"spmenu -mw, --min-width <width> Set minimum width to <width>\n"
|
||||
"spmenu -g, --columns <grid> Set the number of grids to <grid>\n"
|
||||
"spmenu -gc, --generate-cache Generate image cache\n"
|
||||
"spmenu -ngc, --no-generate-cache Don't generate image cache\n"
|
||||
|
|
|
@ -15,7 +15,7 @@ static int alpha = 1; /* Enable alpha */
|
|||
static int menuposition = 1; /* Position of the menu (0: Bottom, 1: Top, 2: Center */
|
||||
static int menupaddingv = 0; /* Vertical padding of bar (in pixels) */
|
||||
static int menupaddingh = 0; /* Horizontal padding of bar (in pixels) */
|
||||
static int minwidth = 500; /* Minimum width */
|
||||
static int minwidth = 1000; /* Minimum width */
|
||||
static int managed = 0; /* Let your window manager manage spmenu? */
|
||||
|
||||
/* Image options */
|
||||
|
|
2
spmenu.1
2
spmenu.1
|
@ -54,6 +54,8 @@ spmenu -l, \[en]lines line - Set line count to stdin
|
|||
.IP \[bu] 2
|
||||
spmenu -mh, \[en]lineheight height - Set spmenu line height to height
|
||||
.IP \[bu] 2
|
||||
spmenu -mw, \[en]min-width width - Set minimum width to width
|
||||
.IP \[bu] 2
|
||||
spmenu -g, \[en]columns grid - Set the number of grids to grid
|
||||
.IP \[bu] 2
|
||||
spmenu -gc, \[en]generate-cache - Generate image cache
|
||||
|
|
Loading…
Reference in a new issue