summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Guschin <saintruler@gmail.com>2021-09-22 13:23:26 +0400
committerAndrew Guschin <saintruler@gmail.com>2021-09-22 13:23:26 +0400
commit95c3613ed3aecc99aef171fb7216607dd52e5f9d (patch)
tree67dc3cfe05f985d47ba3314a780dddbec3a45ce1
parent94b8725f119e75b440b2fde4b887531434b43704 (diff)
Added colorbar patch and chaged color scheme
-rw-r--r--PKGBUILD2
-rw-r--r--README.md1
-rw-r--r--config.def.h5
-rw-r--r--config.h58
-rw-r--r--dwm.c12
-rw-r--r--patches/dwm-colorbar-6.2.diff68
6 files changed, 127 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 62ed78e..2205e15 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ source=(
'movestack.c' 'selfrestart.c'
)
md5sums=(
- '149ff5a0b678bfde004d4663345f317b'
+ 'f741e7629f8e9a2c2599669c501bbe04'
'37881ae1d06884f38b731b9103c9f373'
'2170b6fe645068a2cad4be60d5ebbd84'
'e1d877b57636568ba579b1bc0ae42e8f'
diff --git a/README.md b/README.md
index 6fbae60..7642bc4 100644
--- a/README.md
+++ b/README.md
@@ -11,3 +11,4 @@ Installed patches:
* [resizecorners](https://dwm.suckless.org/patches/resizecorners/)
* [selfrestart](https://dwm.suckless.org/patches/selfrestart/)
* [focusonnetactive](https://dwm.suckless.org/patches/focusonnetactive/)
+* [colorbar](https://dwm.suckless.org/patches/colorbar/)
diff --git a/config.def.h b/config.def.h
index a3d0640..c773867 100644
--- a/config.def.h
+++ b/config.def.h
@@ -21,6 +21,11 @@ static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
+ [SchemeStatus] = { col_gray3, col_gray1, "#000000" }, // Statusbar right {text,background,not used but cannot be empty}
+ [SchemeTagsSel] = { col_gray4, col_cyan, "#000000" }, // Tagbar left selected {text,background,not used but cannot be empty}
+ [SchemeTagsNorm] = { col_gray3, col_gray1, "#000000" }, // Tagbar left unselected {text,background,not used but cannot be empty}
+ [SchemeInfoSel] = { col_gray4, col_cyan, "#000000" }, // infobar middle selected {text,background,not used but cannot be empty}
+ [SchemeInfoNorm] = { col_gray3, col_gray1, "#000000" }, // infobar middle unselected {text,background,not used but cannot be empty}
};
typedef struct {
diff --git a/config.h b/config.h
index 6788084..7e9c281 100644
--- a/config.h
+++ b/config.h
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
-static const unsigned int borderpx = 3; /* border pixel of windows */
+static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int gappx = 10; /* gap pixel between windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
@@ -10,18 +10,26 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
-static const char *fonts[] = { "TerminessTTF Nerd Font Mono:size=19", "monospace:size=15" };
+static const char *fonts[] = { "TerminessTTF Nerd Font Mono:size=17", "monospace:size=15" };
static const char dmenufont[] = "monospace:size=15";
-static const char col_norm_fg[] = "#ebdbb2";
-static const char col_norm_bg[] = "#282828";
+static const char col_norm_fg[] = "#5f5f54";
+static const char col_norm_bg[] = "#111416";
static const char col_norm_brd[] = "#282828";
-static const char col_sel_fg[] = "#282828";
-static const char col_sel_bg[] = "#d5c4a1";
+static const char col_sel_fg[] = "#eeeeec";
+static const char col_sel_bg[] = "#111416";
static const char col_sel_brd[] = "#a89984";
static const char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { col_norm_fg, col_norm_bg, col_norm_brd },
- [SchemeSel] = { col_sel_fg, col_sel_bg, col_sel_brd },
+ /* fg bg border */
+ [SchemeNorm] = { col_norm_fg, col_norm_bg, col_norm_brd },
+ [SchemeSel] = { col_sel_fg, col_sel_bg, col_sel_brd },
+
+ [SchemeStatus] = { col_sel_fg, col_sel_bg, "#000000" }, // Statusbar right {text,background,not used but cannot be empty}
+
+ [SchemeTagsSel] = { col_sel_fg, col_sel_bg, "#000000" }, // Tagbar left selected {text,background,not used but cannot be empty}
+ [SchemeTagsNorm] = { col_norm_fg, col_norm_bg, "#000000" }, // Tagbar left unselected {text,background,not used but cannot be empty}
+
+ [SchemeInfoSel] = { col_sel_fg, col_sel_bg, "#000000" }, // infobar middle selected {text,background,not used but cannot be empty}
+ [SchemeInfoNorm] = { col_sel_fg, col_sel_bg, "#000000" }, // infobar middle unselected {text,background,not used but cannot be empty}
};
typedef struct {
@@ -47,6 +55,7 @@ static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ "Pcmanfm", NULL, NULL, 0, 1, -1 },
+ { NULL, NULL, "OpenGL", 0, 1, -1 },
{ NULL, "spterm", NULL, SPTAG(0), 1, -1 },
{ NULL, "telegram", NULL, SPTAG(1), 1, -1 },
};
@@ -87,9 +96,6 @@ static const char *termcmd[] = { "st", NULL };
#include "movestack.c"
static Key keys[] = {
/* modifier key function argument */
- // These two shortcuts are handled by sxhkd
- // { MODKEY, XK_p, spawn, {.v = dmenucmd } },
- // { MODKEY, XK_Return, spawn, SHCMD("$TERMINAL") },
{ MODKEY, XK_slash, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
@@ -127,6 +133,34 @@ static Key keys[] = {
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_r, self_restart, {0} },
{ MODKEY|ShiftMask, XK_e, quit, {0} },
+
+ { MODKEY, XK_w, spawn, SHCMD("$BROWSER") },
+ { MODKEY, XK_p, spawn, SHCMD("dmenu-desktop") },
+ { MODKEY|ShiftMask, XK_p, spawn, SHCMD("passmenu -i -l 5") },
+ { MODKEY, XK_b, spawn, SHCMD("pcmanfm") },
+ { MODKEY|ShiftMask, XK_b, spawn, SHCMD("bluecontrol") },
+ { MODKEY, XK_Return, spawn, SHCMD("x-terminal-emulator") },
+ { MODKEY, XK_Tab, spawn, SHCMD("x-terminal-emulator -e htop") },
+ { MODKEY|ShiftMask, XK_t, spawn, SHCMD("x-terminal-emulator -e transopen") },
+ { MODKEY, XK_m, spawn, SHCMD("x-terminal-emulator -e music localhost") },
+ { MODKEY|ShiftMask, XK_m, spawn, SHCMD("x-terminal-emulator -e music") },
+
+ { 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t; pkill -RTMIN+9 dwmblocks") },
+ { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --allow-boost -d 5; pkill -RTMIN+9 dwmblocks") },
+ { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer --allow-boost -i 5; pkill -RTMIN+9 dwmblocks") },
+ { 0, XF86XK_TouchpadOff, spawn, SHCMD("notify-send 'Touchpad turned off'") },
+ { 0, XF86XK_TouchpadOn, spawn, SHCMD("notify-send 'Touchpad turned on'") },
+ { 0, XF86XK_MonBrightnessDown, spawn, SHCMD("brightnessctl set 5%-") },
+ { 0, XF86XK_MonBrightnessUp, spawn, SHCMD("brightnessctl set 5%+") },
+
+ { 0, XK_Print, spawn, SHCMD("screenshot area to clip") },
+ { 0|ShiftMask, XK_Print, spawn, SHCMD("screenshot area to file") },
+
+ { 0|ControlMask, XK_Print, spawn, SHCMD("screenshot window to clip") },
+ { 0|ControlMask|ShiftMask, XK_Print, spawn, SHCMD("screenshot window to file") },
+
+ { MODKEY, XK_Print, spawn, SHCMD("screenshot screen to clip") },
+ { MODKEY|ShiftMask, XK_Print, spawn, SHCMD("screenshot screen to file") },
};
/* button definitions */
diff --git a/dwm.c b/dwm.c
index 4de3243..c716175 100644
--- a/dwm.c
+++ b/dwm.c
@@ -78,7 +78,7 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
-enum { SchemeNorm, SchemeSel }; /* color schemes */
+enum { SchemeNorm, SchemeSel, SchemeStatus, SchemeTagsSel, SchemeTagsNorm, SchemeInfoSel, SchemeInfoNorm }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
@@ -817,7 +817,7 @@ drawbar(Monitor *m)
/* draw status first so it can be overdrawn by tags later */
if (m == selmon) { /* status is only drawn on selected monitor */
- drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_setscheme(drw, scheme[SchemeStatus]);
sw = TEXTW(stext) - lrpad / 2 + 2; /* 2px right padding */
drw_text(drw, m->ww - sw - stw, 0, sw, bh, lrpad / 2 - 2, stext, 0);
}
@@ -831,7 +831,7 @@ drawbar(Monitor *m)
x = 0;
for (i = 0; i < LENGTH(tags); i++) {
w = TEXTW(tags[i]);
- drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
+ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel : SchemeTagsNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
if (occ & 1 << i)
drw_rect(drw, x + boxs, boxs, boxw, boxw,
@@ -840,17 +840,17 @@ drawbar(Monitor *m)
x += w;
}
w = blw = TEXTW(m->ltsymbol);
- drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_setscheme(drw, scheme[SchemeTagsNorm]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
if ((w = m->ww - sw - stw - x) > bh) {
if (m->sel) {
- drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
+ drw_setscheme(drw, scheme[m == selmon ? SchemeInfoSel : SchemeInfoNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
if (m->sel->isfloating)
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
} else {
- drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_setscheme(drw, scheme[SchemeInfoNorm]);
drw_rect(drw, x, 0, w, bh, 1, 1);
}
}
diff --git a/patches/dwm-colorbar-6.2.diff b/patches/dwm-colorbar-6.2.diff
new file mode 100644
index 0000000..91c067d
--- /dev/null
+++ b/patches/dwm-colorbar-6.2.diff
@@ -0,0 +1,68 @@
+diff --git a/config.def.h b/config.def.h
+index 1c0b587..a516645 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -16,6 +16,11 @@ static const char *colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
++ [SchemeStatus] = { col_gray3, col_gray1, "#000000" }, // Statusbar right {text,background,not used but cannot be empty}
++ [SchemeTagsSel] = { col_gray4, col_cyan, "#000000" }, // Tagbar left selected {text,background,not used but cannot be empty}
++ [SchemeTagsNorm] = { col_gray3, col_gray1, "#000000" }, // Tagbar left unselected {text,background,not used but cannot be empty}
++ [SchemeInfoSel] = { col_gray4, col_cyan, "#000000" }, // infobar middle selected {text,background,not used but cannot be empty}
++ [SchemeInfoNorm] = { col_gray3, col_gray1, "#000000" }, // infobar middle unselected {text,background,not used but cannot be empty}
+ };
+
+ /* tagging */
+diff --git a/dwm.c b/dwm.c
+index 4465af1..0d1d2f7 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -59,7 +59,7 @@
+
+ /* enums */
+ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
+-enum { SchemeNorm, SchemeSel }; /* color schemes */
++enum { SchemeNorm, SchemeSel, SchemeStatus, SchemeTagsSel, SchemeTagsNorm, SchemeInfoSel, SchemeInfoNorm }; /* color schemes */
+ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
+ NetWMFullscreen, NetActiveWindow, NetWMWindowType,
+ NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
+@@ -703,7 +703,7 @@ drawbar(Monitor *m)
+
+ /* draw status first so it can be overdrawn by tags later */
+ if (m == selmon) { /* status is only drawn on selected monitor */
+- drw_setscheme(drw, scheme[SchemeNorm]);
++ drw_setscheme(drw, scheme[SchemeStatus]);
+ sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
+ drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
+ }
+@@ -716,7 +716,7 @@ drawbar(Monitor *m)
+ x = 0;
+ for (i = 0; i < LENGTH(tags); i++) {
+ w = TEXTW(tags[i]);
+- drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
++ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel : SchemeTagsNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
+ if (occ & 1 << i)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw,
+@@ -725,17 +725,17 @@ drawbar(Monitor *m)
+ x += w;
+ }
+ w = blw = TEXTW(m->ltsymbol);
+- drw_setscheme(drw, scheme[SchemeNorm]);
++ drw_setscheme(drw, scheme[SchemeTagsNorm]);
+ x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
+
+ if ((w = m->ww - sw - x) > bh) {
+ if (m->sel) {
+- drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
++ drw_setscheme(drw, scheme[m == selmon ? SchemeInfoSel : SchemeInfoNorm]);
+ drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
+ if (m->sel->isfloating)
+ drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
+ } else {
+- drw_setscheme(drw, scheme[SchemeNorm]);
++ drw_setscheme(drw, scheme[SchemeInfoNorm]);
+ drw_rect(drw, x, 0, w, bh, 1, 1);
+ }
+ }