border_width added

This commit is contained in:
mrdotx 2021-07-26 18:17:19 +02:00
parent e76d6436ec
commit 6e342e888c
No known key found for this signature in database
GPG Key ID: 433F70E636E6EB87
3 changed files with 12 additions and 2 deletions

1
README
View File

@ -32,6 +32,7 @@ monitor = -1;
bottom = false;
embedded = false;
line_height = 26;
border_width = 0;
font = "DejaVuSansMono Nerd Font:pixelsize=16:antialias=true:autohint=true";
min_password_length = 32;
asterisk= "*";

View File

@ -37,6 +37,9 @@ Embed into window.
.BI "line_height =" " 26"
Defines menu line of at least 'line_height' pixels tall.
.TP
.BI "border_width =" " 0"
Defines the border width for the menu.
.TP
.BI "font =" " DejaVuSansMono Nerd Font:pixelsize=16:antialias=true:autohint=true"
Defines the font or font set used.
.TP
@ -191,7 +194,8 @@ Paste from primary X selection
monitor = -1;
bottom = false;
embedded = false;
lineheight = 26;
line_height = 26;
border_width = 0;
font = "DejaVuSansMono Nerd Font:pixelsize=16:antialias=true:autohint=true";
min_passwword_length = 32;
asterisk= "*";

View File

@ -351,9 +351,11 @@ setup(void) {
swa.override_redirect = True;
swa.background_pixel = scheme[SchemePrompt][ColBg].pixel;
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, 0,
win = XCreateWindow(dpy, parentwin, x, y, mw, mh, borderwidth,
CopyFromParent, CopyFromParent, CopyFromParent,
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
if (borderwidth)
XSetWindowBorder(dpy, win, scheme[SchemeSelect][ColBg].pixel);
/* Open input methods */
xim = XOpenIM(dpy, NULL, NULL, NULL);
@ -748,6 +750,9 @@ main(int argc, char *argv[]) {
if (config_lookup_int(&cfg, "line_height", &val)) {
lineheight = val;
}
if (config_lookup_int(&cfg, "border_width", &val)) {
borderwidth = val;
}
if (config_lookup_string(&cfg, "font", &str)) {
fonts[0] = str;
}