Remove WinTitle again, fix 1 px left padding bottom bar

This commit is contained in:
BitHeaven-Official 2023-02-27 09:23:29 +05:00
parent f91eebdbe4
commit f811e03254
7 changed files with 28 additions and 37 deletions

View File

@ -5,21 +5,21 @@
/* appearance */
static const unsigned int borderpx = 4;
static const unsigned int gappx = 10;
static const unsigned int gappx = 15;
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int showextrabar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char statussep = ';';
static const int horizpadbar = 5;
static const int vertpadbar = 8;
static const int horizpadbar = 8;
static const int vertpadbar = 12;
static const int vertpadstat = 0;
static const char *fonts[] = {
"Ubuntu Mono:style=Bold:size=10:antialias=true:autohint=true",
"Font Awesome 6 Free Solid:style=Solid:size=10:antialias=true:autohint=true",
"Font Awesome 6 Brands Regular:style=Regular:size=10:antialias=true:autohint=true"
"Ubuntu Mono:style=Bold:size=12:antialias=true:autohint=true",
"Font Awesome 6 Free Solid:style=Solid:size=12:antialias=true:autohint=true",
"Font Awesome 6 Brands Regular:style=Regular:size=12:antialias=true:autohint=true"
};
static const char dmenufont[] = "Ubuntu Mono:size=10";
static const char dmenufont[] = "Ubuntu Mono:size=12";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@ -96,7 +96,7 @@ static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL }
static const char *backlightup[] = { "s", "set-sink-mute", "0", "toggle", NULL };
static const char *dmenucmd[] = { "dmenu_run", "-g", "10", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
static Key keys[] = {

View File

@ -5,21 +5,21 @@
/* appearance */
static const unsigned int borderpx = 4;
static const unsigned int gappx = 10;
static const unsigned int gappx = 15;
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int showextrabar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char statussep = ';';
static const int horizpadbar = 5;
static const int vertpadbar = 8;
static const int horizpadbar = 8;
static const int vertpadbar = 12;
static const int vertpadstat = 0;
static const char *fonts[] = {
"Ubuntu Mono:style=Bold:size=10:antialias=true:autohint=true",
"Font Awesome 6 Free Solid:style=Solid:size=10:antialias=true:autohint=true",
"Font Awesome 6 Brands Regular:style=Regular:size=10:antialias=true:autohint=true"
"Ubuntu Mono:style=Bold:size=12:antialias=true:autohint=true",
"Font Awesome 6 Free Solid:style=Solid:size=12:antialias=true:autohint=true",
"Font Awesome 6 Brands Regular:style=Regular:size=12:antialias=true:autohint=true"
};
static const char dmenufont[] = "Ubuntu Mono:size=10";
static const char dmenufont[] = "Ubuntu Mono:size=12";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@ -35,11 +35,13 @@ static const char *colors[][3] = {
static const char *tags[] = { "", "", "3", "", "5", "6", "7", "8", "" };
/* launcher commands (They must be NULL terminated) */
static const char* grabc[] = { "grabc", "|", "tr", "-d", "'\n'", "|", "xclip", "-selection", "clipboard", NULL };
static const char* bhev[] = { "firefox", "bhev.ru", NULL };
static const char* youtube[] = { "firefox", "youtube.com", NULL };
static const Launcher launchers[] = {
/* command name to display */
{ grabc, "" },
{ bhev, "" },
{ youtube, "" },
};
@ -92,7 +94,9 @@ static const char *volup[] = { "pactl", "set-sink-volume", "0", "+5%", NULL };
static const char *voldown[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
static const char *dmenucmd[] = { "dmenu_run", "-g", "10", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *backlightup[] = { "s", "set-sink-mute", "0", "toggle", NULL };
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
static Key keys[] = {

BIN
drw.o

Binary file not shown.

BIN
dwm

Binary file not shown.

29
dwm.c
View File

@ -819,7 +819,7 @@ drawstatusbar(Monitor *m, int bh, int extra, char* stext) {
w = m->ww;
// w = m->ww - w - 2 * hpb;
ret = 1;
x = 0;
x = 0 - 1;
x2 = m->ww - w2 - 2 * hpb;
} else {
// w += 2; /* 1px padding on both sides */
@ -959,11 +959,11 @@ drawstatusbar(Monitor *m, int bh, int extra, char* stext) {
void
drawbar(Monitor *m)
{
int x, w, tw = 0;
int x, w, tw = 0;
int boxs = drw->fonts->h / 9;
int boxw = drw->fonts->h / 6 + 2;
unsigned int i, occ = 0, urg = 0;
Client *c;
int boxw = drw->fonts->h / 6 + 2;
unsigned int i, occ = 0, urg = 0;
Client *c;
if (m->showbar) {
/* draw status first so it can be overdrawn by tags later */
@ -1005,18 +1005,8 @@ drawbar(Monitor *m)
}
if ((w = m->ww - tw - x) > bh) {
if (m->sel) {
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
drw_text(drw, x, 0, w - 2 * hpb, bh, lrpad / 2, m->sel->name, 0);
if (m->sel->isfloating) {
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
if (m->sel->isalwaysontop)
drw_rect(drw, x + boxs, bh - boxw, boxw, boxw, 0, 0);
}
} else {
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, w - 2 * hpb, bh, 1, 1);
}
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, w - 2 * hpb, bh, 1, 1);
}
if (m->showbar)
@ -1518,11 +1508,8 @@ propertynotify(XEvent *e)
drawbars();
break;
}
if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName])
updatetitle(c);
if (c == c->mon->sel)
drawbar(c->mon);
}
if (ev->atom == netatom[NetWMWindowType])
updatewindowtype(c);
}

BIN
dwm.o

Binary file not shown.

BIN
util.o

Binary file not shown.