Start of rice
This commit is contained in:
parent
29d66b3864
commit
fc6af96710
5 changed files with 135 additions and 16 deletions
6
README
6
README
|
@ -46,3 +46,9 @@ Configuration
|
|||
-------------
|
||||
The configuration of dwm is done by creating a custom config.h
|
||||
and (re)compiling the source code.
|
||||
|
||||
Rice-specific info
|
||||
------------------
|
||||
This is a custom rice.
|
||||
I have modified the config and also added the following patches:
|
||||
- dwm-colorbar (https://dwm.suckless.org/patches/colorbar/)
|
55
config.def.h
55
config.def.h
|
@ -1,27 +1,62 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int borderpx = 3; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "monospace:size=12", "fontawesome:size=12" };
|
||||
static const char dmenufont[] = "monospace:size=12";
|
||||
// bg
|
||||
static const char col_gray1[] = "#121212";
|
||||
// inactive border
|
||||
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
// font
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
// current tag and current window
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
// top bar 2nd color and active window border color
|
||||
static const char col_cyan[] = "#370045";
|
||||
static const char col_cyan[] = "#005577";
|
||||
|
||||
// !! TO SEE THE COLORS, PLEASE REFER TO https://www.nordtheme.com/docs/colors-and-palettes
|
||||
|
||||
// Polar Night
|
||||
static const char col_nord0[] = "#2e3440";
|
||||
static const char col_nord1[] = "#3b4252";
|
||||
static const char col_nord2[] = "#434c5e";
|
||||
static const char col_nord3[] = "#4c566a";
|
||||
|
||||
// Snow Storm
|
||||
static const char col_nord4[] = "#d8dee9";
|
||||
static const char col_nord5[] = "#e5e9f0";
|
||||
static const char col_nord6[] = "#eceff4";
|
||||
|
||||
// Frost
|
||||
|
||||
static const char col_nord7[] = "#8fbcbb";
|
||||
static const char col_nord8[] = "#88c0d0";
|
||||
static const char col_nord9[] = "#81a1c1";
|
||||
static const char col_nord10[] = "#5e81ac";
|
||||
|
||||
// Aurora
|
||||
|
||||
static const char col_nord11[] = "#bf616a";
|
||||
static const char col_nord12[] = "#d08770";
|
||||
static const char col_nord13[] = "#ebcb8b";
|
||||
static const char col_nord14[] = "#a3be8c";
|
||||
static const char col_nord15[] = "#b48ead";
|
||||
|
||||
static const char col_nord15_light[] = "#8e5783";
|
||||
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
||||
[SchemeNorm] = { col_nord5, col_nord0, col_gray2 },
|
||||
[SchemeSel] = { col_nord6, col_nord15_light, col_nord15_light },
|
||||
|
||||
// text, bg, unused
|
||||
[SchemeStatus] = { col_nord5, col_nord15, "#000000" }, // Statusbar right
|
||||
|
||||
[SchemeTagsSel] = { col_nord6, col_nord15, "#000000" }, // Tagbar left selected
|
||||
[SchemeTagsNorm] = { col_nord5, col_nord0, "#000000" }, // Tagbar left unselected
|
||||
|
||||
[SchemeInfoSel] = { col_nord6, col_nord15_light, "#000000" }, // infobar middle selected
|
||||
[SchemeInfoNorm] = { col_nord5, col_nord0, "#000000" }, // infobar middle unselected
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
|
|
68
dwm-colorbar-6.2.diff
Normal file
68
dwm-colorbar-6.2.diff
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
12
dwm.c
12
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);
|
||||
}
|
||||
}
|
||||
|
|
10
test.sh
Executable file
10
test.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script is a dirty hack, just so I can test my config quicky.
|
||||
|
||||
rm config.h
|
||||
make
|
||||
|
||||
Xephyr -br -ac -noreset -screen 800x600 :1 &
|
||||
sleep 0.6
|
||||
DISPLAY=:1 ./dwm &
|
Loading…
Reference in a new issue