Added Color Status Patch and set Ubuntu Awesome Fonts

This commit is contained in:
Linux User 2022-08-16 10:10:53 +00:00
parent adc415215e
commit 5354bf1928
5 changed files with 111 additions and 110 deletions

View File

@ -2,9 +2,6 @@
/* appearance */
#define FONT "JetBrainsMono Nerd Font"
#define FONTSIZE "10"
static const unsigned int borderpx = 4;
static const unsigned int gappx = 10;
static const unsigned int snap = 32; /* snap pixel */
@ -12,8 +9,13 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int horizpadbar = 5;
static const int vertpadbar = 6;
static const char *fonts[] = { FONT":size=10", "Symbols Nerd Font:size=20" };
static const char dmenufont[] = FONT":size="FONTSIZE;
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"
};
static const char dmenufont[] = "Ubuntu Mono:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@ -26,7 +28,7 @@ static const char *colors[][3] = {
};
/* tagging */
static const char *tags[] = { "", "", "3", "", "5", "6", "7", "8", "" };
static const char *tags[] = { "", "", "3", "", "5", "6", "7", "8", "" };
static const Rule rules[] = {
/* xprop(1):
@ -65,7 +67,7 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-g", "10", /* "-z", "20", */ "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, 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 *termcmd[] = { "st", NULL };
static Key keys[] = {

View File

@ -2,9 +2,6 @@
/* appearance */
#define FONT "JetBrainsMono Nerd Font"
#define FONTSIZE "10"
static const unsigned int borderpx = 4;
static const unsigned int gappx = 10;
static const unsigned int snap = 32; /* snap pixel */
@ -12,8 +9,13 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int horizpadbar = 5;
static const int vertpadbar = 6;
static const char *fonts[] = { FONT":size=10", "Symbols Nerd Font:size=20" };
static const char dmenufont[] = FONT":size="FONTSIZE;
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"
};
static const char dmenufont[] = "Ubuntu Mono:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@ -26,7 +28,7 @@ static const char *colors[][3] = {
};
/* tagging */
static const char *tags[] = { "", "", "3", "", "5", "6", "7", "8", "" };
static const char *tags[] = { "", "", "3", "", "5", "6", "7", "8", "" };
static const Rule rules[] = {
/* xprop(1):
@ -65,7 +67,7 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-g", "10", /* "-z", "20", */ "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, 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 *termcmd[] = { "st", NULL };
static Key keys[] = {

BIN
dwm

Binary file not shown.

17
dwm.c
View File

@ -700,7 +700,7 @@ dirtomon(int dir)
return m;
}
void
int
drawstatusbar(Monitor *m, int bh, char* stext) {
int ret, i, w, x, len;
short isCode = 0;
@ -738,8 +738,9 @@ drawstatusbar(Monitor *m, int bh, char* stext) {
isCode = 0;
text = p;
w += 2; /* 1px pad on sides */ // MAYBE THAT DELETE
ret = x = m->ww - w;
w += 2; /* 1px padding on both sides */
ret = m->ww - w;
x = m->ww - w - 2 * vpb;
drw_setscheme(drw, scheme[LENGTH(colors)]);
drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
@ -755,7 +756,7 @@ drawstatusbar(Monitor *m, int bh, char* stext) {
text[i] = '\0';
w = TEXTW(text) - lrpad;
drw_text(drw, x, 0, w, bh, 0, text, 0);
drw_text(drw, x, vertpadstat, w, bh - 2 * vertpadstat, 0, text, 0);
x += w;
@ -798,12 +799,8 @@ drawstatusbar(Monitor *m, int bh, char* stext) {
}
if (!isCode) {
// w = TEXTW(text) - lrpad;
w = TEXTW(text); // THIS ROW
// drw_text(drw, m->ww - tw , 0, tw, bh, 0 , text, 0);
// drw_text(drw, m->ww - tw - 2 * hpb, 0, tw, bh, lrpad / 2, text, 0);
// drw_text(drw, x , 0, w , bh, 0 , text, 0);
drw_text(drw, x - 2 * hpb , 0, w , bh, lrpad / 2, text, 0); // THIS ROW
w = TEXTW(text) - lrpad;
drw_text(drw, x, 0, w, bh, 0, text, 0);
}
drw_setscheme(drw, scheme[SchemeNorm]);

BIN
dwm.o

Binary file not shown.