Fix typos, change argument
This commit is contained in:
parent
fe49f1ff7c
commit
597bcb541b
|
@ -36,8 +36,8 @@ You may use long, descriptive arguments or the shorter arguments.
|
|||
`-mh, --line-height height`
|
||||
: Set spmenu line height to height
|
||||
|
||||
`-mw, --min-width width`
|
||||
: Set minimum width to width when centered
|
||||
`-cw, --center-width width`
|
||||
: Set width to width when centered
|
||||
|
||||
`-g, --columns grid`
|
||||
: Set the number of grids to grid
|
||||
|
|
10
libs/argv.c
10
libs/argv.c
|
@ -313,11 +313,11 @@ void readargs(int argc, char *argv[]) {
|
|||
}
|
||||
} else if (!strcmp(argv[i], "-l") || (!strcmp(argv[i], "--lines"))) { // number of lines in grid
|
||||
lines = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-sp.mh") || (!strcmp(argv[i], "--lineheight")) || (!strcmp(argv[i], "--line-height"))) { // line height
|
||||
} else if (!strcmp(argv[i], "-mh") || (!strcmp(argv[i], "--lineheight")) || (!strcmp(argv[i], "--line-height"))) { // line height
|
||||
lineheight += atoi(argv[++i]);
|
||||
if (columns == 0) columns = 1;
|
||||
} else if (!strcmp(argv[i], "-sp.mw") || (!strcmp(argv[i], "--min-width"))) { // line height
|
||||
minwidth = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-cw") || (!strcmp(argv[i], "--center-width")) || (!strcmp(argv[i], "-mw") || (!strcmp(argv[i], "--min-width")))) { // center width
|
||||
centerwidth = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-txp") || (!strcmp(argv[i], "--text-padding"))) { // text padding
|
||||
textpadding = atoi(argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-lp") || (!strcmp(argv[i], "--vertical-padding"))) { // vertical padding
|
||||
|
@ -598,8 +598,8 @@ void usage(int status) {
|
|||
fputs(": fancy dynamic menu\n\n"
|
||||
"- Arguments -\n"
|
||||
"spmenu -l, --lines <line> Set line count to stdin\n"
|
||||
"spmenu -sp.mh, --line-height <height> Set spmenu line height to <height>\n"
|
||||
"spmenu -sp.mw, --min-width <width> Set minimum width to <width> when centered\n"
|
||||
"spmenu -mh, --line-height <height> Set spmenu line height to <height>\n"
|
||||
"spmenu -cw, --center-width <width> Set width to <width> when centered\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"
|
||||
|
|
|
@ -280,7 +280,7 @@ void conf_init(void) {
|
|||
config_setting_lookup_int(conf, "margin-vertical", &menumarginv); // spmenu.window.margin-vertical
|
||||
config_setting_lookup_int(conf, "margin-horizontal", &menumarginh); // spmenu.window.margin-horizontal
|
||||
config_setting_lookup_int(conf, "x", &xpos); // spmenu.window.x
|
||||
config_setting_lookup_int(conf, "y", &xpos); // spmenu.window.y
|
||||
config_setting_lookup_int(conf, "y", &ypos); // spmenu.window.y
|
||||
config_setting_lookup_int(conf, "width", &menuwidth); // spmenu.window.width
|
||||
config_setting_lookup_int(conf, "border", &borderwidth); // spmenu.window.border
|
||||
config_setting_lookup_int(conf, "managed", &managed); // spmenu.window.managed
|
||||
|
@ -333,7 +333,7 @@ void conf_init(void) {
|
|||
for (unsigned int i = 0; i < config_setting_length(center_setting); ++i) {
|
||||
config_setting_t *conf = config_setting_get_elem(center_setting, i);
|
||||
|
||||
config_setting_lookup_int(conf, "width", &minwidth); // spmenu.center.width
|
||||
config_setting_lookup_int(conf, "width", ¢erwidth); // spmenu.center.width
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@ void resizetoimageheight_x11(int imageheight) {
|
|||
get_mh();
|
||||
|
||||
if (menuposition == 2) { // centered
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, minwidth), mo.output_width);
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, centerwidth), mo.output_width);
|
||||
x = (mo.output_width - sp.mw) / 2 + xpos;
|
||||
y = (mo.output_height - sp.mh) / 2 - ypos;
|
||||
} else { // top or bottom
|
||||
|
|
|
@ -26,7 +26,7 @@ static int menupaddingh = 0; /* Horizontal padding inside the menu (px) */
|
|||
static int menuwidth = 0; /* spmenu width */
|
||||
static int menumarginv = 0; /* Vertical padding around the menu */
|
||||
static int menumarginh = 0; /* Horizontal padding around the menu */
|
||||
static int minwidth = 1000; /* Minimum width when centered */
|
||||
static int centerwidth = 1000; /* Width when centered */
|
||||
static int xpos = 0; /* X position to offset spmenu */
|
||||
static int ypos = 0; /* Y position to offset spmenu */
|
||||
static int managed = 0; /* Let your window manager manage spmenu? */
|
||||
|
|
|
@ -113,7 +113,7 @@ void theme_load(void) {
|
|||
for (unsigned int i = 0; i < config_setting_length(center_setting); ++i) {
|
||||
config_setting_t *conf = config_setting_get_elem(center_setting, i);
|
||||
|
||||
config_setting_lookup_int(conf, "width", &minwidth); // theme.center.width
|
||||
config_setting_lookup_int(conf, "width", ¢erwidth); // theme.center.width
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ void handle_wl(void) {
|
|||
get_mh();
|
||||
|
||||
if (menuposition == 2) {
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, minwidth), mo.output_width);
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, centerwidth), mo.output_width);
|
||||
}
|
||||
|
||||
state.width = sp.mw;
|
||||
|
|
|
@ -95,7 +95,7 @@ void resizeclient_x11(void) {
|
|||
}
|
||||
|
||||
if (menuposition == 2) { // centered
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, minwidth), mo.output_width);
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, centerwidth), mo.output_width);
|
||||
x = (mo.output_width - sp.mw) / 2 + xpos;
|
||||
y = (mo.output_height - sp.mh) / 2 - ypos;
|
||||
} else { // top or bottom
|
||||
|
|
|
@ -67,7 +67,7 @@ void setupdisplay_x11(void) {
|
|||
get_mh();
|
||||
|
||||
if (menuposition == 2) { // centered
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, minwidth), mo.output_width);
|
||||
sp.mw = MIN(MAX(max_textw() + sp.promptw, centerwidth), mo.output_width);
|
||||
x = (mo.output_width - sp.mw) / 2 + xpos;
|
||||
y = (mo.output_height - sp.mh) / 2 - ypos;
|
||||
} else { // top or bottom
|
||||
|
|
32
spmenu.1
32
spmenu.1
|
@ -61,8 +61,8 @@ You may use long, descriptive arguments or the shorter arguments.
|
|||
\f[V]-mh, --line-height height\f[R]
|
||||
Set spmenu line height to height
|
||||
.TP
|
||||
\f[V]-mw, --min-width width\f[R]
|
||||
Set minimum width to width when centered
|
||||
\f[V]-cw, --center-width width\f[R]
|
||||
Set width to width when centered
|
||||
.TP
|
||||
\f[V]-g, --columns grid\f[R]
|
||||
Set the number of grids to grid
|
||||
|
@ -1073,34 +1073,12 @@ equal
|
|||
T}@T{
|
||||
setimgsize
|
||||
T}@T{
|
||||
+1
|
||||
T}
|
||||
T{
|
||||
0
|
||||
T}@T{
|
||||
Ctrl
|
||||
T}@T{
|
||||
minus
|
||||
T}@T{
|
||||
setimgsize
|
||||
T}@T{
|
||||
-1
|
||||
T}
|
||||
T{
|
||||
0
|
||||
T}@T{
|
||||
0
|
||||
T}@T{
|
||||
equal
|
||||
T}@T{
|
||||
setimgsize
|
||||
T}@T{
|
||||
+10
|
||||
T}
|
||||
T{
|
||||
0
|
||||
T}@T{
|
||||
0
|
||||
Ctrl
|
||||
T}@T{
|
||||
minus
|
||||
T}@T{
|
||||
|
@ -1139,7 +1117,7 @@ T}@T{
|
|||
T}@T{
|
||||
setimggaps
|
||||
T}@T{
|
||||
-1
|
||||
-10
|
||||
T}
|
||||
T{
|
||||
0
|
||||
|
@ -1150,7 +1128,7 @@ T}@T{
|
|||
T}@T{
|
||||
setimggaps
|
||||
T}@T{
|
||||
+1
|
||||
+10
|
||||
T}
|
||||
T{
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue