add a caps lock indicator, took lots of work

This commit is contained in:
speedie 2023-04-20 21:22:45 +02:00
parent cf43599ccf
commit b79f5c39c1
30 changed files with 266 additions and 87 deletions

View file

@ -125,6 +125,12 @@ You may use long, descriptive arguments or the shorter arguments.
`-imt, --insert-mode-text text` `-imt, --insert-mode-text text`
: Set insert mode text to text : Set insert mode text to text
`-clon, --caps-lock-on-text text`
: Set caps lock on text to text
`-clof, --caps-lock-off-text text`
: Set caps lock off text to text
`-bw, --border-width width` `-bw, --border-width width`
: Set width of the border to width . 0 will disable the border : Set width of the border to width . 0 will disable the border
@ -191,6 +197,9 @@ You may use long, descriptive arguments or the shorter arguments.
`-hi, --hide-image` `-hi, --hide-image`
: Hide image : Hide image
`-hcl, --hide-caps`
: Hide caps lock indicator
`-sm, --show-mode` `-sm, --show-mode`
: Show mode indicator : Show mode indicator

View file

@ -36,6 +36,8 @@ spmenu.col_caretbg: #222222
spmenu.col_border: #35638A spmenu.col_border: #35638A
spmenu.col_modefg: #ffffff spmenu.col_modefg: #ffffff
spmenu.col_modebg: #35638A spmenu.col_modebg: #35638A
spmenu.col_capsfg: #ffffff
spmenu.col_capsbg: #45638A
spmenu.col_sgr0: #000000 spmenu.col_sgr0: #000000
spmenu.col_sgr1: #7f0000 spmenu.col_sgr1: #7f0000
spmenu.col_sgr2: #007f00 spmenu.col_sgr2: #007f00
@ -82,14 +84,18 @@ spmenu.alpha_caretfgfg: 255
spmenu.alpha_caretfgbg: 200 spmenu.alpha_caretfgbg: 200
spmenu.alpha_modefg: 255 spmenu.alpha_modefg: 255
spmenu.alpha_modebg: 200 spmenu.alpha_modebg: 200
spmenu.alpha_capsfg: 255
spmenu.alpha_capsbg: 200
!! Powerline !! Powerline
spmenu.powerlineprompt: 1 spmenu.powerlineprompt: 1
spmenu.powerlinecount: 1 spmenu.powerlinecount: 1
spmenu.powerlinemode: 1 spmenu.powerlinemode: 1
spmenu.powerlinecaps: 1
spmenu.promptpwlstyle: 0 spmenu.promptpwlstyle: 0
spmenu.matchcountpwlstyle: 0 spmenu.matchcountpwlstyle: 0
spmenu.modepwlstyle: 0 spmenu.modepwlstyle: 0
spmenu.capspwlstyle: 0
!! Misc color !! Misc color
spmenu.globalcolors: 1 spmenu.globalcolors: 1
@ -156,6 +162,7 @@ spmenu.hideitem: 0
spmenu.hideprompt: 0 spmenu.hideprompt: 0
spmenu.hideinput: 0 spmenu.hideinput: 0
spmenu.hidepowerline: 0 spmenu.hidepowerline: 0
spmenu.hidecaps: 0
spmenu.hidecaret: 0 spmenu.hidecaret: 0
spmenu.hidehighlight: 0 spmenu.hidehighlight: 0
spmenu.hideimage: 0 spmenu.hideimage: 0
@ -168,5 +175,6 @@ spmenu.pango_leftarrow: 0
spmenu.pango_rightarrow: 0 spmenu.pango_rightarrow: 0
spmenu.pango_numbers: 0 spmenu.pango_numbers: 0
spmenu.pango_mode: 0 spmenu.pango_mode: 0
spmenu.pango_caps: 0
spmenu.pango_password: 0 spmenu.pango_password: 0
spmenu.pango_highlight: 1 spmenu.pango_highlight: 1

View file

@ -35,6 +35,8 @@ spmenu =
password = "*"; password = "*";
prompt = ""; prompt = "";
input = ""; input = "";
capslockon = "Caps Lock";
capslockoff = "";
} ); } );
// Color // Color
@ -63,6 +65,8 @@ spmenu =
numbg = "#2d3856"; numbg = "#2d3856";
modefg = "#ffffff"; modefg = "#ffffff";
modebg = "#35638A"; modebg = "#35638A";
capsfg = "#ffffff";
capsbg = "#45638A";
border = "#35638A"; border = "#35638A";
caretfg = "#ffffff"; caretfg = "#ffffff";
caretbg = "#222222"; caretbg = "#222222";
@ -115,15 +119,19 @@ spmenu =
caretbg = 200; caretbg = 200;
modefg = 255; modefg = 255;
modebg = 200; modebg = 200;
capsfg = 255;
capsbg = 200;
} ); } );
// Powerline options // Powerline options
powerline = ( { promptstyle = 0; powerline = ( { promptstyle = 0;
matchcountstyle = 0; matchcountstyle = 0;
modestyle = 0; modestyle = 0;
capsstyle = 0;
prompt = 1; prompt = 1;
matchcount = 1; matchcount = 1;
mode = 1; mode = 1;
caps = 1;
} ); } );
// Hide options // Hide options
@ -137,6 +145,7 @@ spmenu =
highlight = 0; highlight = 0;
matchcount = 0; matchcount = 0;
mode = 0; mode = 0;
caps = 0;
image = 0; image = 0;
} ); } );
@ -200,6 +209,7 @@ spmenu =
rightarrow = 0; rightarrow = 0;
numbers = 0; numbers = 0;
mode = 0; mode = 0;
caps = 0;
password = 0; password = 0;
} ); } );
}; };

View file

@ -250,8 +250,12 @@ readargs(int argc, char *argv[])
fonts[0] = argv[++i]; fonts[0] = argv[++i];
else if (!strcmp(argv[i], "-nmt") || (!strcmp(argv[i], "--normal-mode-text"))) // normal mode text else if (!strcmp(argv[i], "-nmt") || (!strcmp(argv[i], "--normal-mode-text"))) // normal mode text
strcpy(normtext, argv[++i]); strcpy(normtext, argv[++i]);
else if (!strcmp(argv[i], "-imt") || (!strcmp(argv[i], "--insert-mode-text"))) { // insert mode text else if (!strcmp(argv[i], "-imt") || (!strcmp(argv[i], "--insert-mode-text"))) // insert mode text
strcpy(instext, argv[++i]); strcpy(instext, argv[++i]);
else if (!strcmp(argv[i], "-clon") || (!strcmp(argv[i], "--caps-lock-on-text"))) // caps lock on text
strcpy(capslockontext, argv[++i]);
else if (!strcmp(argv[i], "-clof") || (!strcmp(argv[i], "--caps-lock-off-text"))) { // caps lock off text
strcpy(capslockofftext, argv[++i]);
// dmenu compatibility options // dmenu compatibility options
} else if (!strcmp(argv[i], "-nb")) { // normal background color } else if (!strcmp(argv[i], "-nb")) { // normal background color
@ -436,12 +440,16 @@ usage(void)
"spmenu -na, --no-alpha Disable alpha\n" "spmenu -na, --no-alpha Disable alpha\n"
"spmenu -tp, --allow-typing Allow the user to type\n" "spmenu -tp, --allow-typing Allow the user to type\n"
"spmenu -nt, --no-allow-typing Don't allow typing, the user must select an option\n" "spmenu -nt, --no-allow-typing Don't allow typing, the user must select an option\n"
"spmenu -x, --x-position <x offset> Offset spmenu x position by <x offset>\n" , stdout);
fputs("spmenu -x, --x-position <x offset> Offset spmenu x position by <x offset>\n"
"spmenu -y, --y-position <y offset> Offset spmenu y position by <y offset>\n" "spmenu -y, --y-position <y offset> Offset spmenu y position by <y offset>\n"
"spmenu -n, --preselect <line> Preselect <line> in the list of items\n" "spmenu -n, --preselect <line> Preselect <line> in the list of items\n"
"spmenu -z, --width <width> Width of the spmenu window\n" "spmenu -z, --width <width> Width of the spmenu window\n"
"spmenu -nmt, --normal-mode-text <text> Set normal mode text to <text>\n" "spmenu -nmt, --normal-mode-text <text> Set normal mode text to <text>\n"
"spmenu -imt, --insert-mode-text <text> Set insert mode text to <text>\n" "spmenu -imt, --insert-mode-text <text> Set insert mode text to <text>\n"
"spmenu -clon, --caps-lock-on-text <text> Set caps lock on text to <text>\n"
"spmenu -clof, --caps-lock-off-text <text> Set caps lock off text to <text>\n"
"spmenu -bw, --border-width <width> Set width of the border to <width>. 0 will disable the border\n" "spmenu -bw, --border-width <width> Set width of the border to <width>. 0 will disable the border\n"
"spmenu -so, --sort Sort matches\n" "spmenu -so, --sort Sort matches\n"
"spmenu -nso, --no-sort Don't sort matches\n" "spmenu -nso, --no-sort Don't sort matches\n"
@ -467,6 +475,7 @@ usage(void)
"spmenu -hc, --hide-caret, --hide-cursor Hide caret\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 -hcl, --hide-caps Hide caps lock indicator\n"
"spmenu -sm, --show-mode Show mode indicator\n" "spmenu -sm, --show-mode Show mode indicator\n"
"spmenu -smc, --show-match-count Show match count\n" "spmenu -smc, --show-match-count Show match count\n"
"spmenu -sla, --show-left-arrow Show left arrow\n" "spmenu -sla, --show-left-arrow Show left arrow\n"

View file

@ -16,6 +16,7 @@ static unsigned int alphas[][2] = {
[SchemeCaret] = { 255, 200 }, [SchemeCaret] = { 255, 200 },
[SchemeNumber] = { 255, 200 }, [SchemeNumber] = { 255, 200 },
[SchemeBorder] = { 255, 200 }, [SchemeBorder] = { 255, 200 },
[SchemeCaps] = { 255, 200 },
}; };
// colorscheme array // colorscheme array
@ -29,6 +30,7 @@ static char *colors[SchemeLast][2] = {
[SchemeItemSelPri] = { col_itemselprifg, col_itemselpribg }, [SchemeItemSelPri] = { col_itemselprifg, col_itemselpribg },
[SchemeInput] = { col_inputfg, col_inputbg, }, [SchemeInput] = { col_inputfg, col_inputbg, },
[SchemeMenu] = { NULL, col_menu }, [SchemeMenu] = { NULL, col_menu },
[SchemeCaps] = { col_capsfg, col_capsbg },
[SchemePrompt] = { col_promptfg, col_promptbg }, [SchemePrompt] = { col_promptfg, col_promptbg },
[SchemeNormHighlight] = { col_hlnormfg, col_hlnormbg }, [SchemeNormHighlight] = { col_hlnormfg, col_hlnormbg },
[SchemeSelHighlight] = { col_hlselfg, col_hlselbg }, [SchemeSelHighlight] = { col_hlselfg, col_hlselbg },

View file

@ -120,9 +120,11 @@ conf_init(void)
config_setting_lookup_int(conf, "promptstyle", &promptpwlstyle); // spmenu.powerline.promptstyle config_setting_lookup_int(conf, "promptstyle", &promptpwlstyle); // spmenu.powerline.promptstyle
config_setting_lookup_int(conf, "matchcountstyle", &matchcountpwlstyle); // spmenu.powerline.matchcountstyle config_setting_lookup_int(conf, "matchcountstyle", &matchcountpwlstyle); // spmenu.powerline.matchcountstyle
config_setting_lookup_int(conf, "modestyle", &modepwlstyle); // spmenu.powerline.modestyle config_setting_lookup_int(conf, "modestyle", &modepwlstyle); // spmenu.powerline.modestyle
config_setting_lookup_int(conf, "capsstyle", &capspwlstyle); // spmenu.powerline.capsstyle
config_setting_lookup_int(conf, "prompt", &powerlineprompt); // spmenu.powerline.prompt config_setting_lookup_int(conf, "prompt", &powerlineprompt); // spmenu.powerline.prompt
config_setting_lookup_int(conf, "matchcount", &powerlinecount); // spmenu.powerline.matchcount config_setting_lookup_int(conf, "matchcount", &powerlinecount); // spmenu.powerline.matchcount
config_setting_lookup_int(conf, "mode", &powerlinemode); // spmenu.powerline.mode config_setting_lookup_int(conf, "mode", &powerlinemode); // spmenu.powerline.mode
config_setting_lookup_int(conf, "caps", &powerlinecaps); // spmenu.powerline.caps
} }
} }
@ -152,24 +154,30 @@ conf_init(void)
config_setting_t *conf = config_setting_get_elem(setting, i); config_setting_t *conf = config_setting_get_elem(setting, i);
// look up // look up
config_setting_lookup_string(conf, "font", &dest); // spmenu.text.font if (config_setting_lookup_string(conf, "font", &dest)) // spmenu.text.font
strcpy(font, strdup(dest)); strcpy(font, strdup(dest));
config_setting_lookup_int(conf, "padding", &textpadding); // spmenu.text.padding config_setting_lookup_int(conf, "padding", &textpadding); // spmenu.text.padding
config_setting_lookup_string(conf, "leftarrow", &dest); // spmenu.text.leftarrow if (config_setting_lookup_string(conf, "leftarrow", &dest)) // spmenu.text.leftarrow
leftarrow = strdup(dest); leftarrow = strdup(dest);
config_setting_lookup_string(conf, "rightarrow", &dest); // spmenu.text.rightarrow if (config_setting_lookup_string(conf, "rightarrow", &dest)) // spmenu.text.rightarrow
rightarrow = strdup(dest); rightarrow = strdup(dest);
config_setting_lookup_string(conf, "password", &dest); if (config_setting_lookup_string(conf, "password", &dest))
password = strdup(dest); password = strdup(dest);
config_setting_lookup_string(conf, "prompt", &dest); if (config_setting_lookup_string(conf, "prompt", &dest))
prompt = strdup(dest); prompt = strdup(dest);
config_setting_lookup_string(conf, "input", &dest); if (config_setting_lookup_string(conf, "capslockon", &dest))
capslockontext = strdup(dest);
if (config_setting_lookup_string(conf, "capslockoff", &dest))
capslockofftext = strdup(dest);
if (config_setting_lookup_string(conf, "input", &dest))
input = strdup(dest); input = strdup(dest);
} }
} }
@ -223,6 +231,9 @@ conf_init(void)
config_setting_lookup_int(conf, "modefg", &alpha_modefg); // spmenu.alpha.modefg config_setting_lookup_int(conf, "modefg", &alpha_modefg); // spmenu.alpha.modefg
config_setting_lookup_int(conf, "modebg", &alpha_modebg); // spmenu.alpha.modebg config_setting_lookup_int(conf, "modebg", &alpha_modebg); // spmenu.alpha.modebg
config_setting_lookup_int(conf, "capsfg", &alpha_capsfg); // spmenu.alpha.capsfg
config_setting_lookup_int(conf, "capsbg", &alpha_capsbg); // spmenu.alpha.capsbg
} }
} }
@ -320,6 +331,13 @@ conf_init(void)
if (config_setting_lookup_string(conf, "modebg", &dest)) if (config_setting_lookup_string(conf, "modebg", &dest))
strcpy(colors[SchemeMode][ColBg], strdup(dest)); strcpy(colors[SchemeMode][ColBg], strdup(dest));
// caps
if (config_setting_lookup_string(conf, "capsfg", &dest))
strcpy(colors[SchemeCaps][ColFg], strdup(dest));
if (config_setting_lookup_string(conf, "capsbg", &dest))
strcpy(colors[SchemeCaps][ColBg], strdup(dest));
// border // border
if (config_setting_lookup_string(conf, "border", &dest)) if (config_setting_lookup_string(conf, "border", &dest))
strcpy(colors[SchemeBorder][ColBg], strdup(dest)); strcpy(colors[SchemeBorder][ColBg], strdup(dest));
@ -521,6 +539,7 @@ conf_init(void)
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
config_setting_lookup_int(conf, "caps", &hidecaps); // spmenu.hide.caps
config_setting_lookup_int(conf, "hideimage", &hideimage); // spmenu.hide.image config_setting_lookup_int(conf, "hideimage", &hideimage); // spmenu.hide.image
} }
} }
@ -544,6 +563,7 @@ conf_init(void)
config_setting_lookup_int(conf, "rightarrow", &pango_rightarrow); // spmenu.pango.rightarrow config_setting_lookup_int(conf, "rightarrow", &pango_rightarrow); // spmenu.pango.rightarrow
config_setting_lookup_int(conf, "numbers", &pango_numbers); // spmenu.pango.numbers config_setting_lookup_int(conf, "numbers", &pango_numbers); // spmenu.pango.numbers
config_setting_lookup_int(conf, "mode", &pango_mode); // spmenu.pango.mode config_setting_lookup_int(conf, "mode", &pango_mode); // spmenu.pango.mode
config_setting_lookup_int(conf, "caps", &pango_caps); // spmenu.pango.caps
config_setting_lookup_int(conf, "password", &pango_password); // spmenu.pango.mode config_setting_lookup_int(conf, "password", &pango_password); // spmenu.pango.mode
} }
} }

View file

@ -181,6 +181,7 @@ drawitem(int x, int y, int w)
int modeWidth = 0; int modeWidth = 0;
int larrowWidth = 0; int larrowWidth = 0;
int rarrowWidth = 0; int rarrowWidth = 0;
int capsWidth = 0;
// add width // add width
if (!hidelarrow) larrowWidth = pango_leftarrow ? TEXTWM(leftarrow) : TEXTW(leftarrow); if (!hidelarrow) larrowWidth = pango_leftarrow ? TEXTWM(leftarrow) : TEXTW(leftarrow);
@ -188,6 +189,7 @@ drawitem(int x, int y, int w)
if (!hidemode) modeWidth = pango_mode ? TEXTWM(modetext) : TEXTW(modetext); if (!hidemode) modeWidth = pango_mode ? TEXTWM(modetext) : TEXTW(modetext);
if (!hiderarrow) rarrowWidth = pango_rightarrow ? TEXTWM(rightarrow) : TEXTW(rightarrow); if (!hiderarrow) rarrowWidth = pango_rightarrow ? TEXTWM(rightarrow) : TEXTW(rightarrow);
if (!hidematchcount) numberWidth = pango_numbers ? TEXTWM(numbers) : TEXTW(numbers); if (!hidematchcount) numberWidth = pango_numbers ? TEXTWM(numbers) : TEXTW(numbers);
if (!hidecaps) capsWidth = pango_caps ? TEXTWM(capstext) : TEXTW(capstext);
// mode indicator is always going to be at the right // mode indicator is always going to be at the right
if (hidemode) { if (hidemode) {
@ -235,7 +237,7 @@ drawitem(int x, int y, int w)
x = drawlarrow(x, y, w); x = drawlarrow(x, y, w);
for (item = curr; item != next; item = item->right) // draw items for (item = curr; item != next; item = item->right) // draw items
x = drawitemtext(item, x, y, MIN(pango_item ? TEXTWM(item->text) : TEXTW(item->text), mw - x - rarrowWidth - numberWidth - modeWidth - menumarginh)); x = drawitemtext(item, x, y, MIN(pango_item ? TEXTWM(item->text) : TEXTW(item->text), mw - x - rarrowWidth - numberWidth - modeWidth - capsWidth - menumarginh));
w = rarrowWidth + numberWidth + modeWidth + menumarginh; w = rarrowWidth + numberWidth + modeWidth + menumarginh;
x = drawrarrow(mw - w, y, w); x = drawrarrow(mw - w, y, w);
@ -378,6 +380,33 @@ drawmode(int x, int y, int w)
return x; return x;
} }
int
drawcaps(int x, int y, int w)
{
if (!w) return x; // not caps lock
if (!hidecaps) { // draw caps lock indicator
int powerlinewidth = 0;
if (!hidepowerline && powerlinecaps) {
powerlinewidth = plw / 2;
}
drw_setscheme(drw, scheme[SchemeCaps]);
drw_text(drw, x, y, w, bh, lrpad / 2 + powerlinewidth, capstext, 0, pango_caps ? True : False);
// draw powerline for caps lock indicator
if (!hidepowerline && powerlinecaps) {
drw_settrans(drw, scheme[SchemeCaps], hidemode ? hidematchcount ? scheme[SchemeMenu] : scheme[SchemeNumber] : scheme[SchemeMode]);
drw_arrow(drw, x, y, plw, bh, 0, capspwlstyle);
x += plw;
}
}
return x;
}
void void
drawmenu(void) drawmenu(void)
{ {
@ -390,9 +419,14 @@ drawmenu(void)
int numberWidth = 0; int numberWidth = 0;
int modeWidth = 0; int modeWidth = 0;
int capsWidth = 0;
// add width // add width
if (!hidemode) modeWidth = pango_mode ? TEXTWM(modetext) : TEXTW(modetext); if (!hidemode) modeWidth = pango_mode ? TEXTWM(modetext) : TEXTW(modetext);
if (!hidecaps) capsWidth = pango_caps ? TEXTWM(capstext) : TEXTW(capstext);
if (!strcmp(capstext, ""))
capsWidth = 0;
// calculate match count // calculate match count
if (!hidematchcount) { if (!hidematchcount) {
@ -441,12 +475,17 @@ drawmenu(void)
if (!hidematchcount) { if (!hidematchcount) {
w = numberWidth; w = numberWidth;
drawnumber(mw - numberWidth - modeWidth - 2 * sp - 2 * borderwidth - menumarginh, y, w); drawnumber(mw - numberWidth - modeWidth - capsWidth - 2 * sp - 2 * borderwidth - menumarginh, y, w);
} }
if (!hidemode) { if (!hidemode) {
w = modeWidth; w = modeWidth;
drawmode(mw - modeWidth - 2 * sp - 2 * borderwidth - menumarginh, y, w); drawmode(mw - modeWidth - capsWidth - 2 * sp - 2 * borderwidth - menumarginh, y, w);
}
if (!hidecaps) {
w = capsWidth;
drawcaps(mw - capsWidth - 2 * sp - 2 * borderwidth - menumarginh, y, w);
} }
drw_map(drw, win, 0, 0, mw, mh); drw_map(drw, win, 0, 0, mw, mh);

View file

@ -4,5 +4,6 @@ static int drawprompt(int x, int y, int w);
static int drawinput(int x, int y, int w); static int drawinput(int x, int y, int w);
static int drawnumber(int x, int y, int w); static int drawnumber(int x, int y, int w);
static int drawmode(int x, int y, int w); static int drawmode(int x, int y, int w);
static int drawcaps(int x, int y, int w);
static int drawlarrow(int x, int y, int w); static int drawlarrow(int x, int y, int w);
static int drawrarrow(int x, int y, int w); static int drawrarrow(int x, int y, int w);

View file

@ -47,6 +47,10 @@ eventloop(void)
if (ev.xvisibility.state != VisibilityUnobscured) if (ev.xvisibility.state != VisibilityUnobscured)
XRaiseWindow(dpy, win); XRaiseWindow(dpy, win);
break; break;
case KeyRelease:
getcapsstate();
drawmenu();
break;
} }
// redraw image on X11 event // redraw image on X11 event

View file

@ -69,9 +69,22 @@ grabkeyboard(void)
// try to grab keyboard, we may have to wait for another process to ungrab // try to grab keyboard, we may have to wait for another process to ungrab
for (i = 0; i < 1000; i++) { for (i = 0; i < 1000; i++) {
if (XGrabKeyboard(dpy, DefaultRootWindow(dpy), True, GrabModeAsync, if (XGrabKeyboard(dpy, DefaultRootWindow(dpy), True, GrabModeAsync,
GrabModeAsync, CurrentTime) == GrabSuccess) GrabModeAsync, CurrentTime) == GrabSuccess) {
getcapsstate();
return; return;
}
nanosleep(&ts, NULL); nanosleep(&ts, NULL);
} }
die("cannot grab keyboard"); die("cannot grab keyboard");
} }
void
getcapsstate(void)
{
unsigned int cs = 0;
XkbGetIndicatorState(dpy, XkbUseCoreKbd, &cs);
capslockstate = (cs & 0x01) == 1;
strncpy(capstext, capslockstate ? capslockontext : capslockofftext, 15);
}

View file

@ -9,3 +9,6 @@ typedef struct {
static void updatenumlockmask(void); static void updatenumlockmask(void);
static void keypress(XEvent *e); static void keypress(XEvent *e);
static void grabkeyboard(void); static void grabkeyboard(void);
static void getcapsstate(void);
static char capstext[16] = "Caps Lock";

View file

@ -4,7 +4,7 @@ switchmode(const Arg *arg)
curMode = !curMode; curMode = !curMode;
allowkeys = !curMode; allowkeys = !curMode;
strcpy(modetext, curMode ? instext : normtext); strncpy(modetext, curMode ? instext : normtext, 15);
drawmenu(); drawmenu();
} }

View file

@ -72,11 +72,16 @@ buttonpress(XEvent *e)
int rarrowWidth = 0; int rarrowWidth = 0;
int numberWidth = 0; int numberWidth = 0;
int modeWidth = 0; int modeWidth = 0;
int capsWidth = 0;
if (!hidelarrow) larrowWidth = pango_leftarrow ? TEXTWM(leftarrow) : TEXTW(leftarrow); if (!hidelarrow) larrowWidth = pango_leftarrow ? TEXTWM(leftarrow) : TEXTW(leftarrow);
if (!hiderarrow) rarrowWidth = pango_rightarrow ? TEXTWM(rightarrow) : TEXTW(rightarrow); if (!hiderarrow) rarrowWidth = pango_rightarrow ? TEXTWM(rightarrow) : TEXTW(rightarrow);
if (!hidematchcount) numberWidth = pango_numbers ? TEXTWM(numbers) : TEXTW(numbers); if (!hidematchcount) numberWidth = pango_numbers ? TEXTWM(numbers) : TEXTW(numbers);
if (!hidemode) modeWidth = pango_mode ? TEXTWM(modetext) : TEXTW(modetext); if (!hidemode) modeWidth = pango_mode ? TEXTWM(modetext) : TEXTW(modetext);
if (!hidecaps) capsWidth = pango_caps ? TEXTWM(capstext) : TEXTW(capstext);
if (!strcmp(capstext, ""))
capsWidth = 0;
// if incorrect or wrong window, return // if incorrect or wrong window, return
if (ev->window != win) if (ev->window != win)
@ -88,9 +93,11 @@ buttonpress(XEvent *e)
// check if we clicked on the prompt or the input // check if we clicked on the prompt or the input
if (ev->x < x + promptw + powerlineprompt ? plw : 0) { if (ev->x < x + promptw + powerlineprompt ? plw : 0) {
click = clickprompt; click = clickprompt;
} else if (ev->x > mw - modeWidth - 2 * sp - 2 * borderwidth) { } else if ((ev->x > mw - capsWidth - 2 * sp - 2 * borderwidth) && !hidecaps) {
click = clickcaps;
} else if (ev->x > mw - modeWidth - capsWidth - 2 * sp - 2 * borderwidth) {
click = clickmode; click = clickmode;
} else if (ev->x > mw - modeWidth - numberWidth - 2 * sp - 2 * borderwidth) { } else if (ev->x > mw - modeWidth - numberWidth - capsWidth - 2 * sp - 2 * borderwidth) {
click = clicknumber; click = clicknumber;
} else { // actually we clicked on the input } else { // actually we clicked on the input
w = (lines > 0 || !matches) ? mw - x : inputw; w = (lines > 0 || !matches) ? mw - x : inputw;

View file

@ -16,6 +16,7 @@ enum {
clickselitem, clickselitem,
clickrarrow, clickrarrow,
clicknumber, clicknumber,
clickcaps,
clickmode, clickmode,
}; };

View file

@ -39,6 +39,8 @@ init_appearance(void)
alphas[SchemeNumber][ColBg] = alpha_numbg; alphas[SchemeNumber][ColBg] = alpha_numbg;
alphas[SchemeMode][ColFg] = alpha_modefg; alphas[SchemeMode][ColFg] = alpha_modefg;
alphas[SchemeMode][ColBg] = alpha_modebg; alphas[SchemeMode][ColBg] = alpha_modebg;
alphas[SchemeCaps][ColFg] = alpha_capsfg;
alphas[SchemeCaps][ColBg] = alpha_capsbg;
alphas[SchemeBorder][ColBg] = alpha_border; alphas[SchemeBorder][ColBg] = alpha_border;
// create color schemes from array // create color schemes from array

View file

@ -16,5 +16,6 @@ enum { SchemeLArrow,
SchemeNumber, SchemeNumber,
SchemeMode, SchemeMode,
SchemeBorder, SchemeBorder,
SchemeCaps,
SchemeLast, SchemeLast,
}; };

View file

@ -29,6 +29,8 @@ ResourcePref resources[] = {
{ "col_border", STRING, &col_border }, { "col_border", STRING, &col_border },
{ "col_promptfg", STRING, &col_promptfg }, { "col_promptfg", STRING, &col_promptfg },
{ "col_promptbg", STRING, &col_promptbg }, { "col_promptbg", STRING, &col_promptbg },
{ "col_capsfg", STRING, &col_capsfg },
{ "col_capsbg", STRING, &col_capsbg },
// Alpha // Alpha
{ "alpha_itemnormfg", INTEGER, &alpha_itemnormfg }, { "alpha_itemnormfg", INTEGER, &alpha_itemnormfg },
@ -59,6 +61,8 @@ ResourcePref resources[] = {
{ "alpha_caretbg", INTEGER, &alpha_caretbg }, { "alpha_caretbg", INTEGER, &alpha_caretbg },
{ "alpha_modefg", INTEGER, &alpha_modefg }, { "alpha_modefg", INTEGER, &alpha_modefg },
{ "alpha_modebg", INTEGER, &alpha_modebg }, { "alpha_modebg", INTEGER, &alpha_modebg },
{ "alpha_capsfg", INTEGER, &alpha_capsfg },
{ "alpha_capsbg", INTEGER, &alpha_capsbg },
// SGR sequence colors // SGR sequence colors
{ "col_sgr0", STRING, &col_sgr0 }, { "col_sgr0", STRING, &col_sgr0 },
@ -82,9 +86,11 @@ ResourcePref resources[] = {
{ "promptpwlstyle", INTEGER, &promptpwlstyle }, { "promptpwlstyle", INTEGER, &promptpwlstyle },
{ "matchcountpwlstyle", INTEGER, &matchcountpwlstyle }, { "matchcountpwlstyle", INTEGER, &matchcountpwlstyle },
{ "modepwlstyle", INTEGER, &modepwlstyle }, { "modepwlstyle", INTEGER, &modepwlstyle },
{ "capspwlstyle", INTEGER, &capspwlstyle },
{ "powerlineprompt", INTEGER, &powerlineprompt }, { "powerlineprompt", INTEGER, &powerlineprompt },
{ "powerlinecount", INTEGER, &powerlinecount }, { "powerlinecount", INTEGER, &powerlinecount },
{ "powerlinemode", INTEGER, &powerlinemode }, { "powerlinemode", INTEGER, &powerlinemode },
{ "powerlinecaps", INTEGER, &powerlinecaps },
{ "dockproperty", INTEGER, &dockproperty }, { "dockproperty", INTEGER, &dockproperty },
{ "globalcolors", INTEGER, &globalcolors }, { "globalcolors", INTEGER, &globalcolors },
{ "coloritems", INTEGER, &coloritems }, { "coloritems", INTEGER, &coloritems },
@ -122,6 +128,7 @@ ResourcePref resources[] = {
{ "hidepowerline", INTEGER, &hidepowerline }, { "hidepowerline", INTEGER, &hidepowerline },
{ "hidecaret", INTEGER, &hidecaret }, { "hidecaret", INTEGER, &hidecaret },
{ "hidecursor", INTEGER, &hidecaret }, { "hidecursor", INTEGER, &hidecaret },
{ "hidecaps", INTEGER, &hidecaps },
{ "histdup", INTEGER, &histdup }, { "histdup", INTEGER, &histdup },
{ "casesensitive", INTEGER, &casesensitive }, { "casesensitive", INTEGER, &casesensitive },
{ "imagewidth", INTEGER, &imagewidth }, { "imagewidth", INTEGER, &imagewidth },
@ -143,6 +150,7 @@ ResourcePref resources[] = {
{ "pango_rightarrow", INTEGER, &pango_rightarrow }, { "pango_rightarrow", INTEGER, &pango_rightarrow },
{ "pango_numbers", INTEGER, &pango_numbers }, { "pango_numbers", INTEGER, &pango_numbers },
{ "pango_mode", INTEGER, &pango_mode }, { "pango_mode", INTEGER, &pango_mode },
{ "pango_caps", INTEGER, &pango_caps },
{ "pango_password", INTEGER, &pango_password }, { "pango_password", INTEGER, &pango_password },
{ "pango_highlight", INTEGER, &pango_highlight }, { "pango_highlight", INTEGER, &pango_highlight },
}; };
@ -165,13 +173,15 @@ ResourcePref cols[] = {
{ "color0", STRING, &col_inputbg }, { "color0", STRING, &col_inputbg },
{ "color12", STRING, &col_promptbg }, { "color12", STRING, &col_promptbg },
{ "color0", STRING, &col_promptfg }, { "color0", STRING, &col_promptfg },
{ "color7", STRING, &col_capsbg },
{ "color0", STRING, &col_capsfg },
{ "color6", STRING, &col_itemselbg }, { "color6", STRING, &col_itemselbg },
{ "color6", STRING, &col_itemselpribg }, { "color6", STRING, &col_itemselpribg },
{ "color6", STRING, &col_border }, { "color6", STRING, &col_border },
{ "color0", STRING, &col_numfg }, { "color0", STRING, &col_numfg },
{ "color5", STRING, &col_numbg }, { "color5", STRING, &col_numbg },
{ "color0", STRING, &col_modefg }, { "color0", STRING, &col_modefg },
{ "color7", STRING, &col_modebg }, { "color11", STRING, &col_modebg },
{ "color2", STRING, &col_hlnormbg }, { "color2", STRING, &col_hlnormbg },
{ "color3", STRING, &col_hlselbg }, { "color3", STRING, &col_hlselbg },
{ "color0", STRING, &col_hlnormfg }, { "color0", STRING, &col_hlnormfg },

View file

@ -12,6 +12,7 @@
* clickrarrow: - Right arrow * clickrarrow: - Right arrow
* clicknumber: - Match count * clicknumber: - Match count
* clickmode: - Mode indicator * clickmode: - Mode indicator
* clickcaps: - Caps lock indicator
* *
* Button1 - Left click * Button1 - Left click
* Button2 - Middle click * Button2 - Middle click

View file

@ -29,9 +29,11 @@ static int managed = 0; /* Let your window manager manage sp
static int powerlineprompt = 1; /* Enable powerline for the prompt */ static int powerlineprompt = 1; /* Enable powerline for the prompt */
static int powerlinecount = 1; /* Enable powerline for the match count */ static int powerlinecount = 1; /* Enable powerline for the match count */
static int powerlinemode = 1; /* Enable powerline for the mode indicator */ static int powerlinemode = 1; /* Enable powerline for the mode indicator */
static int powerlinecaps = 1; /* Enable powerline for the caps lock indicator */
static int promptpwlstyle = 0; /* Prompt powerline style (0: >, 1: \) */ static int promptpwlstyle = 0; /* Prompt powerline style (0: >, 1: \) */
static int matchcountpwlstyle = 0; /* Match count powerline style (0: <, 1: /) */ static int matchcountpwlstyle = 0; /* Match count powerline style (0: <, 1: /) */
static int modepwlstyle = 0; /* Mode indicator powerline style (0: <, 1: /) */ static int modepwlstyle = 0; /* Mode indicator powerline style (0: <, 1: /) */
static int capspwlstyle = 0; /* Caps lock indicator powerline style (0: <, 1: /) */
/* Window properties */ /* Window properties */
static int dockproperty = 1; /* Set _NET_WM_WINDOW_TYPE_DOCK */ static int dockproperty = 1; /* Set _NET_WM_WINDOW_TYPE_DOCK */
@ -48,6 +50,8 @@ static int maxcache = 512; /* Max image size to cache */
static int mode = 0; /* Mode to start speedwm in (0: Normal mode, 1: Insert mode) */ static int mode = 0; /* Mode to start speedwm in (0: Normal mode, 1: Insert mode) */
static char *normtext = "Normal"; /* Text to display for normal mode */ static char *normtext = "Normal"; /* Text to display for normal mode */
static char *instext = "Insert"; /* Text to display for insert mode */ static char *instext = "Insert"; /* Text to display for insert mode */
static char *capslockontext = "Caps Lock"; /* Text to display for the caps lock indicator when caps lock is on */
static char *capslockofftext = ""; /* Text to display for the caps lock indicator when caps lock is off */
/* Window border options */ /* Window border options */
static int borderwidth = 0; /* Width of the border */ static int borderwidth = 0; /* Width of the border */
@ -90,6 +94,7 @@ static int hidelarrow = 0; /* Hide left arrow (0/1) */
static int hiderarrow = 0; /* Hide right arrow (0/1) */ 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 hidecaps = 0; /* Hide caps lock indicator (0/1) */
static int hidepowerline = 0; /* Hide powerline (0/1) */ static int hidepowerline = 0; /* Hide powerline (0/1) */
static int hidecaret = 0; /* Hide caret (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) */
@ -149,6 +154,10 @@ static char col_caretbg[] = "#222222"; /* Background caret color */
static char col_modefg[] = "#ffffff"; /* Mode text color */ static char col_modefg[] = "#ffffff"; /* Mode text color */
static char col_modebg[] = "#35638A"; /* Mode background color */ static char col_modebg[] = "#35638A"; /* Mode background color */
/* Caps lock colors */
static char col_capsfg[] = "#ffffff"; /* Caps lock text color */
static char col_capsbg[] = "#45638A"; /* Caps lock background color */
/* SGR colors */ /* SGR colors */
static char col_sgr0[] = "#000000"; /* SGR color #0 */ static char col_sgr0[] = "#000000"; /* SGR color #0 */
static char col_sgr1[] = "#7f0000"; /* SGR color #1 */ static char col_sgr1[] = "#7f0000"; /* SGR color #1 */
@ -196,11 +205,14 @@ static int alpha_caretfg = 255; /* Alpha for the caret foreground
static int alpha_caretbg = 200; /* Alpha for the caret background (0-255) */ static int alpha_caretbg = 200; /* Alpha for the caret background (0-255) */
static int alpha_modefg = 255; /* Alpha for the mode indicator foreground (0-255) */ static int alpha_modefg = 255; /* Alpha for the mode indicator foreground (0-255) */
static int alpha_modebg = 200; /* Alpha for the mode indicator background (0-255) */ static int alpha_modebg = 200; /* Alpha for the mode indicator background (0-255) */
static int alpha_capsfg = 255; /* Alpha for the caps lock indicator foreground (0-255) */
static int alpha_capsbg = 200; /* Alpha for the caps lock indicator background (0-255) */
/* Pango options */ /* Pango options */
static int pango_item = 1; /* Enable support for pango markup for the items */ static int pango_item = 1; /* Enable support for pango markup for the items */
static int pango_highlight = 1; /* Enable support for pango markup for the highlighting */ static int pango_highlight = 1; /* Enable support for pango markup for the highlighting */
static int pango_prompt = 1; /* Enable support for pango markup for the prompt */ static int pango_prompt = 1; /* Enable support for pango markup for the prompt */
static int pango_caps = 1; /* Enable support for pango markup for the caps lock indicator */
static int pango_input = 1; /* Enable support for pango markup for user input */ static int pango_input = 1; /* Enable support for pango markup for user input */
static int pango_leftarrow = 0; /* Enable support for pango markup for the left arrow */ static int pango_leftarrow = 0; /* Enable support for pango markup for the left arrow */
static int pango_rightarrow = 0; /* Enable support for pango markup for the right arrow */ static int pango_rightarrow = 0; /* Enable support for pango markup for the right arrow */

View file

@ -142,6 +142,12 @@ Set normal mode text to text
\f[V]-imt, --insert-mode-text text\f[R] \f[V]-imt, --insert-mode-text text\f[R]
Set insert mode text to text Set insert mode text to text
.TP .TP
\f[V]-clon, --caps-lock-on-text text\f[R]
Set caps lock on text to text
.TP
\f[V]-clof, --caps-lock-off-text text\f[R]
Set caps lock off text to text
.TP
\f[V]-bw, --border-width width\f[R] \f[V]-bw, --border-width width\f[R]
Set width of the border to width . Set width of the border to width .
0 will disable the border 0 will disable the border
@ -209,6 +215,9 @@ Hide highlight
\f[V]-hi, --hide-image\f[R] \f[V]-hi, --hide-image\f[R]
Hide image Hide image
.TP .TP
\f[V]-hcl, --hide-caps\f[R]
Hide caps lock indicator
.TP
\f[V]-sm, --show-mode\f[R] \f[V]-sm, --show-mode\f[R]
Show mode indicator Show mode indicator
.TP .TP

View file

@ -121,6 +121,7 @@ static char *embed;
// keybinds // keybinds
static int numlockmask = 0; static int numlockmask = 0;
static int capslockstate = 0;
// height of each item, menu width, menu height // height of each item, menu width, menu height
static int bh, mw, mh; static int bh, mw, mh;

View file

@ -121,6 +121,7 @@ spmenu = {
highlight = 1; highlight = 1;
matchcount = 1; matchcount = 1;
mode = 1; mode = 1;
caps = 1;
image = 1; image = 1;
} ); } );

View file

@ -31,6 +31,8 @@ spmenu.col_caretfg: #cad3f5
spmenu.col_border: #8AADF4 spmenu.col_border: #8AADF4
spmenu.col_modefg: #24273a spmenu.col_modefg: #24273a
spmenu.col_modebg: #F5BDE6 spmenu.col_modebg: #F5BDE6
spmenu.col_capsfg: #24273a
spmenu.col_capsbg: #8AADF4
spmenu.col_sgr0: #494D64 spmenu.col_sgr0: #494D64
spmenu.col_sgr1: #ED8796 spmenu.col_sgr1: #ED8796
spmenu.col_sgr2: #A6DA95 spmenu.col_sgr2: #A6DA95

View file

@ -31,6 +31,8 @@ spmenu.col_caretfg: #0abdc6
spmenu.col_border: #711c91 spmenu.col_border: #711c91
spmenu.col_modefg: #000b1e spmenu.col_modefg: #000b1e
spmenu.col_modebg: #d300c4 spmenu.col_modebg: #d300c4
spmenu.col_capsfg: #000b1e
spmenu.col_capsbg: #1c61c2
spmenu.col_sgr0: #123e7c spmenu.col_sgr0: #123e7c
spmenu.col_sgr1: #ff0000 spmenu.col_sgr1: #ff0000
spmenu.col_sgr2: #d300c4 spmenu.col_sgr2: #d300c4

View file

@ -31,6 +31,8 @@ spmenu.col_caretfg: #d7d7d7
spmenu.col_border: #ff6c6b spmenu.col_border: #ff6c6b
spmenu.col_modefg: #282c34 spmenu.col_modefg: #282c34
spmenu.col_modebg: #51afef spmenu.col_modebg: #51afef
spmenu.col_capsfg: #282c34
spmenu.col_capsbg: #da8548
spmenu.col_sgr0: #1c1f24 spmenu.col_sgr0: #1c1f24
spmenu.col_sgr1: #ff6c6b spmenu.col_sgr1: #ff6c6b
spmenu.col_sgr2: #98be65 spmenu.col_sgr2: #98be65

View file

@ -31,6 +31,8 @@ spmenu.col_caretfg: #f8f8f2
spmenu.col_border: #ff79c6 spmenu.col_border: #ff79c6
spmenu.col_modefg: #282a36 spmenu.col_modefg: #282a36
spmenu.col_modebg: #ff79c6 spmenu.col_modebg: #ff79c6
spmenu.col_capsfg: #282a36
spmenu.col_capsbg: #8b39fd
spmenu.col_sgr0: #000000 spmenu.col_sgr0: #000000
spmenu.col_sgr1: #ff5555 spmenu.col_sgr1: #ff5555
spmenu.col_sgr2: #50fa7b spmenu.col_sgr2: #50fa7b

View file

@ -31,6 +31,8 @@ spmenu.col_caretfg: #fbf1c7
spmenu.col_border: #d79921 spmenu.col_border: #d79921
spmenu.col_modefg: #3c3836 spmenu.col_modefg: #3c3836
spmenu.col_modebg: #d65d0e spmenu.col_modebg: #d65d0e
spmenu.col_capsfg: #3c3836
spmenu.col_capsbg: #d3869b
spmenu.col_sgr0: #282828 spmenu.col_sgr0: #282828
spmenu.col_sgr1: #cc241d spmenu.col_sgr1: #cc241d
spmenu.col_sgr2: #98971a spmenu.col_sgr2: #98971a

View file

@ -4,33 +4,35 @@
! If you want that, then you may set this to 1. ! If you want that, then you may set this to 1.
spmenu.globalcolors: 0 spmenu.globalcolors: 0
spmenu.col_itemnormfg: #ECEFF4 spmenu.col_itemnormfg: #eceff4
spmenu.col_itemnormbg: #2E3440 spmenu.col_itemnormbg: #2e3440
spmenu.col_itemselfg: #ECEFF4 spmenu.col_itemselfg: #eceff4
spmenu.col_itemselbg: #BF616A spmenu.col_itemselbg: #bf616a
spmenu.col_itemnormprifg: #ECEFF4 spmenu.col_itemnormprifg: #eceff4
spmenu.col_itemnormpribg: #3B4252 spmenu.col_itemnormpribg: #3b4252
spmenu.col_itemselprifg: #ECEFF4 spmenu.col_itemselprifg: #eceff4
spmenu.col_itemselpribg: #D08770 spmenu.col_itemselpribg: #d08770
spmenu.col_menu: #2E3440 spmenu.col_menu: #2e3440
spmenu.col_promptfg: #2E3440 spmenu.col_promptfg: #2e3440
spmenu.col_promptbg: #B48EAD spmenu.col_promptbg: #b48ead
spmenu.col_larrowfg: #8FBCBB spmenu.col_larrowfg: #8fbcbb
spmenu.col_rarrowfg: #8FBCBB spmenu.col_rarrowfg: #8fbcbb
spmenu.col_larrowbg: #2E3440 spmenu.col_larrowbg: #2e3440
spmenu.col_rarrowbg: #2E3440 spmenu.col_rarrowbg: #2e3440
spmenu.col_inputfg: #ECEFF4 spmenu.col_inputfg: #eceff4
spmenu.col_inputbg: #2E3440 spmenu.col_inputbg: #2e3440
spmenu.col_numfg: #2E3440 spmenu.col_numfg: #2e3440
spmenu.col_numbg: #A3BE8C spmenu.col_numbg: #a3be8c
spmenu.col_normhlfg: #88C0D0 spmenu.col_normhlfg: #88c0d0
spmenu.col_normhlbg: #2E3440 spmenu.col_normhlbg: #2e3440
spmenu.col_selhlfg: #EBCB8B spmenu.col_selhlfg: #ebcb8b
spmenu.col_selhlbg: #2E3440 spmenu.col_selhlbg: #2e3440
spmenu.col_caretfg: #D8DEE9 spmenu.col_caretfg: #d8dee9
spmenu.col_border: #5E81AC spmenu.col_border: #5e81ac
spmenu.col_modefg: #2E3440 spmenu.col_modefg: #2e3440
spmenu.col_modebg: #81A1C1 spmenu.col_modebg: #81a1c1
spmenu.col_capsfg: #d8dee9
spmenu.col_capsbg: #8fbcbb
spmenu.col_sgr0: #3b4252 spmenu.col_sgr0: #3b4252
spmenu.col_sgr1: #bf616a spmenu.col_sgr1: #bf616a
spmenu.col_sgr2: #a3be8c spmenu.col_sgr2: #a3be8c

View file

@ -6,7 +6,7 @@ spmenu.globalcolors: 0
spmenu.col_itemnormfg: #eee8d5 spmenu.col_itemnormfg: #eee8d5
spmenu.col_itemnormbg: #002b36 spmenu.col_itemnormbg: #002b36
spmenu.col_itemselfg: #eee8d5 spmenu.col_itemselfg: #eee8d5
spmenu.col_itemselbg: #073642 spmenu.col_itemselbg: #dc322f
spmenu.col_itemnormprifg: #eee8d5 spmenu.col_itemnormprifg: #eee8d5
spmenu.col_itemnormpribg: #002b36 spmenu.col_itemnormpribg: #002b36
spmenu.col_itemselprifg: #eee8d5 spmenu.col_itemselprifg: #eee8d5
@ -30,6 +30,8 @@ spmenu.col_caretfg: #eee8d5
spmenu.col_border: #859900 spmenu.col_border: #859900
spmenu.col_modefg: #262626 spmenu.col_modefg: #262626
spmenu.col_modebg: #859900 spmenu.col_modebg: #859900
spmenu.col_capsfg: #262626
spmenu.col_capsbg: #2aa198
spmenu.col_sgr0: #073642 spmenu.col_sgr0: #073642
spmenu.col_sgr1: #dc322f spmenu.col_sgr1: #dc322f
spmenu.col_sgr2: #859900 spmenu.col_sgr2: #859900

View file

@ -31,6 +31,8 @@ spmenu.col_caretfg: #a9b1d6
spmenu.col_border: #7da6ff spmenu.col_border: #7da6ff
spmenu.col_modefg: #1a1b26 spmenu.col_modefg: #1a1b26
spmenu.col_modebg: #ff7a93 spmenu.col_modebg: #ff7a93
spmenu.col_capsfg: #1a1b26
spmenu.col_capsbg: #b9f27c
spmenu.col_sgr0: #32344a spmenu.col_sgr0: #32344a
spmenu.col_sgr1: #f7768e spmenu.col_sgr1: #f7768e
spmenu.col_sgr2: #9ece6a spmenu.col_sgr2: #9ece6a