replace "cursor" with "caret", old arguments are still compatible

though as of now but deprecated
This commit is contained in:
speedie 2023-04-07 20:22:25 +02:00
parent 44c8667506
commit 073b38faac
9 changed files with 21 additions and 20 deletions

View file

@ -176,8 +176,8 @@ You may use long, descriptive arguments or the shorter arguments.
`-hpl, --hide-powerline` `-hpl, --hide-powerline`
: Hide powerline : Hide powerline
`-hc, --hide-cursor` `-hc, --hide-caret, --hide-cursor`
: Hide cursor : Hide caret
`-hhl, --hide-highlighting` `-hhl, --hide-highlighting`
: Hide highlight : Hide highlight
@ -209,8 +209,8 @@ You may use long, descriptive arguments or the shorter arguments.
`-spl, --show-powerline` `-spl, --show-powerline`
: Show powerline : Show powerline
`-sc, --show-cursor` `-sc, --show-caret, --show-cursor`
: Show cursor : Show caret
`-shl, --show-highlighting` `-shl, --show-highlighting`
: Show highlight : Show highlight

View file

@ -114,7 +114,7 @@ spmenu.hideitem: 0
spmenu.hideprompt: 0 spmenu.hideprompt: 0
spmenu.hideinput: 0 spmenu.hideinput: 0
spmenu.hidepowerline: 0 spmenu.hidepowerline: 0
spmenu.hidecursor: 0 spmenu.hidecaret: 0
spmenu.hidehighlight: 0 spmenu.hidehighlight: 0
spmenu.hideimage: 0 spmenu.hideimage: 0

View file

@ -89,7 +89,7 @@ spmenu =
items = 0; items = 0;
prompt = 0; prompt = 0;
powerline = 0; powerline = 0;
cursor = 0; caret = 0;
highlight = 0; highlight = 0;
matchcount = 0; matchcount = 0;
mode = 0; mode = 0;

View file

@ -145,10 +145,10 @@ readargs(int argc, char *argv[])
hidepowerline = 0; hidepowerline = 0;
} else if (!strcmp(argv[i], "-sin") || (!strcmp(argv[i], "--show-input"))) { // show input } else if (!strcmp(argv[i], "-sin") || (!strcmp(argv[i], "--show-input"))) { // show input
hideinput = 0; hideinput = 0;
} else if (!strcmp(argv[i], "-hc") || (!strcmp(argv[i], "--hide-cursor"))) { // hide cursor } else if (!strcmp(argv[i], "-hc") || (!strcmp(argv[i], "--hide-cursor") || (!strcmp(argv[i], "--hide-caret")))) { // hide cursor
hidecursor = 1; hidecaret = 1;
} else if (!strcmp(argv[i], "-sc") || (!strcmp(argv[i], "--show-cursor"))) { // show cursor } else if (!strcmp(argv[i], "-sc") || (!strcmp(argv[i], "--show-cursor") || (!strcmp(argv[i], "--show-caret")))) { // show cursor
hidecursor = 0; hidecaret = 0;
} else if (!strcmp(argv[i], "-hhl") || (!strcmp(argv[i], "--hide-highlighting"))) { // hide highlighting } else if (!strcmp(argv[i], "-hhl") || (!strcmp(argv[i], "--hide-highlighting"))) { // hide highlighting
hidehighlight = 1; hidehighlight = 1;
} else if (!strcmp(argv[i], "-shl") || (!strcmp(argv[i], "--show-highlighting"))) { // show highlighting } else if (!strcmp(argv[i], "-shl") || (!strcmp(argv[i], "--show-highlighting"))) { // show highlighting
@ -449,7 +449,7 @@ usage(void)
"spmenu -hpr, --hide-prompt Hide prompt\n" "spmenu -hpr, --hide-prompt Hide prompt\n"
"spmenu -hip, --hide-input Hide input\n" "spmenu -hip, --hide-input Hide input\n"
"spmenu -hpl, --hide-powerline Hide powerline\n" "spmenu -hpl, --hide-powerline Hide powerline\n"
"spmenu -hc, --hide-cursor Hide cursor\n" "spmenu -hc, --hide-caret, --hide-cursor Hide caret\n"
"spmenu -hhl, --hide-highlighting Hide highlight\n" "spmenu -hhl, --hide-highlighting Hide highlight\n"
"spmenu -hi, --hide-image Hide image\n" "spmenu -hi, --hide-image Hide image\n"
"spmenu -sm, --show-mode Show mode indicator\n" "spmenu -sm, --show-mode Show mode indicator\n"
@ -460,7 +460,7 @@ usage(void)
"spmenu -spr, --show-prompt Show prompt\n" "spmenu -spr, --show-prompt Show prompt\n"
"spmenu -sin, --show-input Show input\n" "spmenu -sin, --show-input Show input\n"
"spmenu -spl, --show-powerline Show powerline\n" "spmenu -spl, --show-powerline Show powerline\n"
"spmenu -sc, --show-cursor Show cursor\n" "spmenu -sc, --show-caret, --show-cursor Show caret\n"
"spmenu -shl, --show-highlighting Show highlight\n" "spmenu -shl, --show-highlighting Show highlight\n"
"spmenu -si, --show-image Show image\n" "spmenu -si, --show-image Show image\n"
"spmenu -xrdb, --xrdb Load .Xresources on runtime\n" "spmenu -xrdb, --xrdb Load .Xresources on runtime\n"

View file

@ -435,7 +435,7 @@ conf_init(void)
config_setting_lookup_int(conf, "prompt", &hideprompt); // spmenu.hide.prompt config_setting_lookup_int(conf, "prompt", &hideprompt); // spmenu.hide.prompt
config_setting_lookup_int(conf, "items", &hideitem); // spmenu.hide.items config_setting_lookup_int(conf, "items", &hideitem); // spmenu.hide.items
config_setting_lookup_int(conf, "powerline", &hidepowerline); // spmenu.hide.powerline config_setting_lookup_int(conf, "powerline", &hidepowerline); // spmenu.hide.powerline
config_setting_lookup_int(conf, "cursor", &hidecursor); // spmenu.hide.cursor config_setting_lookup_int(conf, "caret", &hidecaret); // spmenu.hide.caret
config_setting_lookup_int(conf, "highlight", &hidehighlight); // spmenu.hide.highlight config_setting_lookup_int(conf, "highlight", &hidehighlight); // spmenu.hide.highlight
config_setting_lookup_int(conf, "matchcount", &hidematchcount); // spmenu.hide.matchcount config_setting_lookup_int(conf, "matchcount", &hidematchcount); // spmenu.hide.matchcount
config_setting_lookup_int(conf, "mode", &hidemode); // spmenu.hide.mode config_setting_lookup_int(conf, "mode", &hidemode); // spmenu.hide.mode

View file

@ -292,7 +292,7 @@ drawinput(int x, int y, int w)
curpos = TEXTW(text) - TEXTW(&text[cursor]); curpos = TEXTW(text) - TEXTW(&text[cursor]);
} }
if ((curpos += lrpad / 2 - 1) < w && !hidecursor && !hideprompt) { if ((curpos += lrpad / 2 - 1) < w && !hidecaret && !hideprompt) {
drw_setscheme(drw, scheme[SchemeCaret]); drw_setscheme(drw, scheme[SchemeCaret]);
drw_rect(drw, x + curpos, 2 + (bh - fh) / 2, 2, fh - 4, 1, 0); drw_rect(drw, x + curpos, 2 + (bh - fh) / 2, 2, fh - 4, 1, 0);
} }

View file

@ -80,7 +80,8 @@ ResourcePref resources[] = {
{ "hideprompt", INTEGER, &hideprompt }, { "hideprompt", INTEGER, &hideprompt },
{ "hideinput", INTEGER, &hideinput }, { "hideinput", INTEGER, &hideinput },
{ "hidepowerline", INTEGER, &hidepowerline }, { "hidepowerline", INTEGER, &hidepowerline },
{ "hidecursor", INTEGER, &hidecursor }, { "hidecaret", INTEGER, &hidecaret },
{ "hidecursor", INTEGER, &hidecaret },
{ "histdup", INTEGER, &histdup }, { "histdup", INTEGER, &histdup },
{ "casesensitive", INTEGER, &casesensitive }, { "casesensitive", INTEGER, &casesensitive },
{ "imagewidth", INTEGER, &imagewidth }, { "imagewidth", INTEGER, &imagewidth },

View file

@ -81,7 +81,7 @@ static int hiderarrow = 0; /* Hide right arrow (0/1) */
static int hideitem = 0; /* Hide item (0/1) */ static int hideitem = 0; /* Hide item (0/1) */
static int hideprompt = 0; /* Hide prompt (0/1) */ static int hideprompt = 0; /* Hide prompt (0/1) */
static int hidepowerline = 0; /* Hide powerline (0/1) */ static int hidepowerline = 0; /* Hide powerline (0/1) */
static int hidecursor = 0; /* Hide cursor (0/1) */ static int hidecaret = 0; /* Hide caret (0/1) */
static int hidehighlight = 0; /* Hide highlight (0/1) */ static int hidehighlight = 0; /* Hide highlight (0/1) */
static int hidematchcount = 0; /* Hide match count (0/1) */ static int hidematchcount = 0; /* Hide match count (0/1) */
static int hidemode = 0; /* Hide mode (0/1) */ static int hidemode = 0; /* Hide mode (0/1) */

View file

@ -194,8 +194,8 @@ Hide input
\f[V]-hpl, --hide-powerline\f[R] \f[V]-hpl, --hide-powerline\f[R]
Hide powerline Hide powerline
.TP .TP
\f[V]-hc, --hide-cursor\f[R] \f[V]-hc, --hide-caret, --hide-cursor\f[R]
Hide cursor Hide caret
.TP .TP
\f[V]-hhl, --hide-highlighting\f[R] \f[V]-hhl, --hide-highlighting\f[R]
Hide highlight Hide highlight
@ -227,8 +227,8 @@ Show input
\f[V]-spl, --show-powerline\f[R] \f[V]-spl, --show-powerline\f[R]
Show powerline Show powerline
.TP .TP
\f[V]-sc, --show-cursor\f[R] \f[V]-sc, --show-caret, --show-cursor\f[R]
Show cursor Show caret
.TP .TP
\f[V]-shl, --show-highlighting\f[R] \f[V]-shl, --show-highlighting\f[R]
Show highlight Show highlight