diff --git a/.gitignore b/.gitignore index fb3ddc7..cfadb18 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ dwm/dwm st/st st/config.h dwm/config.h +dmenu/config.h +dmenu/dmenu +dmenu/stest diff --git a/README.md b/README.md new file mode 100644 index 0000000..11e5d8f --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# rice + +I will refactor this soon. Sorry for how weird everything is. + +# usage + +**If you want polybar**: you need the `waffle` and `castella` fonts installed from here: https://addy-dclxvi.github.io/post/bitmap-fonts/ as well as polybar-dwm-module (https://github.com/mihirlad55/polybar-dwm-module) + +**If you get unexpected colors/fonts**: make sure you applied the Xresources file from this repo. + +**GTK Theme I use**: https://github.com/TheGreatMcPain/gruvbox-material-gtk + +**Color scheme**: Gruvbox material dark medium + +**st font I use**: JetBrainsMono Nerd Font (see Xresources file) diff --git a/dmenu/applied_patches/dmenu-lineheight-5.0.diff b/dmenu/applied_patches/dmenu-lineheight-5.0.diff new file mode 100644 index 0000000..3b0df3d --- /dev/null +++ b/dmenu/applied_patches/dmenu-lineheight-5.0.diff @@ -0,0 +1,106 @@ +From ba103e38ea4ab07f9a3ee90627714b9bea17c329 Mon Sep 17 00:00:00 2001 +From: pskry +Date: Sun, 8 Nov 2020 22:04:22 +0100 +Subject: [PATCH] Add an option which defines the lineheight + +Despite both the panel and dmenu using the same font (a Terminus 12), +dmenu is shorter and the panel is visible from under the dmenu bar. +The appearance can be even more distracting when using similar colors +for background and selections. With the option added by this patch, +dmenu can be launched with a '-h 24', thus completely covering the panel. +--- + config.def.h | 3 +++ + dmenu.1 | 5 +++++ + dmenu.c | 11 ++++++++--- + 3 files changed, 16 insertions(+), 3 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 1edb647..4394dec 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -15,6 +15,9 @@ static const char *colors[SchemeLast][2] = { + }; + /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ + static unsigned int lines = 0; ++/* -h option; minimum height of a menu line */ ++static unsigned int lineheight = 0; ++static unsigned int min_lineheight = 8; + + /* + * Characters not considered part of a word while deleting words +diff --git a/dmenu.1 b/dmenu.1 +index 323f93c..f2a82b4 100644 +--- a/dmenu.1 ++++ b/dmenu.1 +@@ -6,6 +6,8 @@ dmenu \- dynamic menu + .RB [ \-bfiv ] + .RB [ \-l + .IR lines ] ++.RB [ \-h ++.IR height ] + .RB [ \-m + .IR monitor ] + .RB [ \-p +@@ -50,6 +52,9 @@ dmenu matches menu items case insensitively. + .BI \-l " lines" + dmenu lists items vertically, with the given number of lines. + .TP ++.BI \-h " height" ++dmenu uses a menu line of at least 'height' pixels tall, but no less than 8. ++.TP + .BI \-m " monitor" + dmenu is displayed on the monitor number supplied. Monitor numbers are starting + from 0. +diff --git a/dmenu.c b/dmenu.c +index 65f25ce..f2a4047 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -131,7 +131,7 @@ drawmenu(void) + { + unsigned int curpos; + struct item *item; +- int x = 0, y = 0, w; ++ int x = 0, y = 0, fh = drw->fonts->h, w; + + drw_setscheme(drw, scheme[SchemeNorm]); + drw_rect(drw, 0, 0, mw, mh, 1, 1); +@@ -148,7 +148,7 @@ drawmenu(void) + curpos = TEXTW(text) - TEXTW(&text[cursor]); + if ((curpos += lrpad / 2 - 1) < w) { + drw_setscheme(drw, scheme[SchemeNorm]); +- drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); ++ drw_rect(drw, x + curpos, 2 + (bh - fh) / 2, 2, fh - 4, 1, 0); + } + + if (lines > 0) { +@@ -609,6 +609,7 @@ setup(void) + + /* calculate menu geometry */ + bh = drw->fonts->h + 2; ++ bh = MAX(bh,lineheight); /* make a menu line AT LEAST 'lineheight' tall */ + lines = MAX(lines, 0); + mh = (lines + 1) * bh; + #ifdef XINERAMA +@@ -689,7 +690,7 @@ setup(void) + static void + usage(void) + { +- fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n" ++ fputs("usage: dmenu [-bfiv] [-l lines] [-h height] [-p prompt] [-fn font] [-m monitor]\n" + " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr); + exit(1); + } +@@ -717,6 +718,10 @@ main(int argc, char *argv[]) + /* these options take one argument */ + else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */ + lines = atoi(argv[++i]); ++ else if (!strcmp(argv[i], "-h")) { /* minimum height of one menu line */ ++ lineheight = atoi(argv[++i]); ++ lineheight = MAX(lineheight, min_lineheight); ++ } + else if (!strcmp(argv[i], "-m")) + mon = atoi(argv[++i]); + else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */ +-- +2.29.2 + diff --git a/dmenu/applied_patches/dmenu-xresources-4.9.diff b/dmenu/applied_patches/dmenu-xresources-4.9.diff new file mode 100644 index 0000000..267fb0a --- /dev/null +++ b/dmenu/applied_patches/dmenu-xresources-4.9.diff @@ -0,0 +1,126 @@ +diff '--color=auto' -up ../dmenu-4.9/dmenu.c ./dmenu.c +--- ../dmenu-4.9/dmenu.c 2019-02-02 13:55:02.000000000 +0100 ++++ ./dmenu.c 2020-05-24 00:27:58.038586112 +0200 +@@ -15,6 +15,7 @@ + #include + #endif + #include ++#include + + #include "drw.h" + #include "util.h" +@@ -53,6 +54,10 @@ static XIC xic; + static Drw *drw; + static Clr *scheme[SchemeLast]; + ++/* Temporary arrays to allow overriding xresources values */ ++static char *colortemp[4]; ++static char *tempfonts; ++ + #include "config.h" + + static int (*fstrncmp)(const char *, const char *, size_t) = strncmp; +@@ -596,8 +601,13 @@ setup(void) + int a, di, n, area = 0; + #endif + /* init appearance */ +- for (j = 0; j < SchemeLast; j++) +- scheme[j] = drw_scm_create(drw, colors[j], 2); ++ for (j = 0; j < SchemeLast; j++) { ++ scheme[j] = drw_scm_create(drw, (const char**)colors[j], 2); ++ } ++ for (j = 0; j < SchemeOut; ++j) { ++ for (i = 0; i < 2; ++i) ++ free(colors[j][i]); ++ } + + clip = XInternAtom(dpy, "CLIPBOARD", False); + utf8 = XInternAtom(dpy, "UTF8_STRING", False); +@@ -687,6 +697,41 @@ usage(void) + exit(1); + } + ++void ++readxresources(void) { ++ XrmInitialize(); ++ ++ char* xrm; ++ if ((xrm = XResourceManagerString(drw->dpy))) { ++ char *type; ++ XrmDatabase xdb = XrmGetStringDatabase(xrm); ++ XrmValue xval; ++ ++ if (XrmGetResource(xdb, "dmenu.font", "*", &type, &xval)) ++ fonts[0] = strdup(xval.addr); ++ else ++ fonts[0] = strdup(fonts[0]); ++ if (XrmGetResource(xdb, "dmenu.background", "*", &type, &xval)) ++ colors[SchemeNorm][ColBg] = strdup(xval.addr); ++ else ++ colors[SchemeNorm][ColBg] = strdup(colors[SchemeNorm][ColBg]); ++ if (XrmGetResource(xdb, "dmenu.foreground", "*", &type, &xval)) ++ colors[SchemeNorm][ColFg] = strdup(xval.addr); ++ else ++ colors[SchemeNorm][ColFg] = strdup(colors[SchemeNorm][ColFg]); ++ if (XrmGetResource(xdb, "dmenu.selbackground", "*", &type, &xval)) ++ colors[SchemeSel][ColBg] = strdup(xval.addr); ++ else ++ colors[SchemeSel][ColBg] = strdup(colors[SchemeSel][ColBg]); ++ if (XrmGetResource(xdb, "dmenu.selforeground", "*", &type, &xval)) ++ colors[SchemeSel][ColFg] = strdup(xval.addr); ++ else ++ colors[SchemeSel][ColFg] = strdup(colors[SchemeSel][ColFg]); ++ ++ XrmDestroyDatabase(xdb); ++ } ++} ++ + int + main(int argc, char *argv[]) + { +@@ -715,15 +760,15 @@ main(int argc, char *argv[]) + else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */ + prompt = argv[++i]; + else if (!strcmp(argv[i], "-fn")) /* font or font set */ +- fonts[0] = argv[++i]; ++ tempfonts = argv[++i]; + else if (!strcmp(argv[i], "-nb")) /* normal background color */ +- colors[SchemeNorm][ColBg] = argv[++i]; ++ colortemp[0] = argv[++i]; + else if (!strcmp(argv[i], "-nf")) /* normal foreground color */ +- colors[SchemeNorm][ColFg] = argv[++i]; ++ colortemp[1] = argv[++i]; + else if (!strcmp(argv[i], "-sb")) /* selected background color */ +- colors[SchemeSel][ColBg] = argv[++i]; ++ colortemp[2] = argv[++i]; + else if (!strcmp(argv[i], "-sf")) /* selected foreground color */ +- colors[SchemeSel][ColFg] = argv[++i]; ++ colortemp[3] = argv[++i]; + else if (!strcmp(argv[i], "-w")) /* embedding window id */ + embed = argv[++i]; + else +@@ -743,8 +788,23 @@ main(int argc, char *argv[]) + die("could not get embedding window attributes: 0x%lx", + parentwin); + drw = drw_create(dpy, screen, root, wa.width, wa.height); +- if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) ++ readxresources(); ++ /* Now we check whether to override xresources with commandline parameters */ ++ if ( tempfonts ) ++ fonts[0] = strdup(tempfonts); ++ if ( colortemp[0]) ++ colors[SchemeNorm][ColBg] = strdup(colortemp[0]); ++ if ( colortemp[1]) ++ colors[SchemeNorm][ColFg] = strdup(colortemp[1]); ++ if ( colortemp[2]) ++ colors[SchemeSel][ColBg] = strdup(colortemp[2]); ++ if ( colortemp[3]) ++ colors[SchemeSel][ColFg] = strdup(colortemp[3]); ++ ++ if (!drw_fontset_create(drw, (const char**)fonts, LENGTH(fonts))) + die("no fonts could be loaded."); ++ ++ free(fonts[0]); + lrpad = drw->fonts->h; + + #ifdef __OpenBSD__ diff --git a/dmenu/config.def.h b/dmenu/config.def.h index 289e86a..c96adcc 100644 --- a/dmenu/config.def.h +++ b/dmenu/config.def.h @@ -1,29 +1,31 @@ /* See LICENSE file for copyright and license details. */ /* Default settings; can be overriden by command line. */ -// gruvbox -static const char col_gruvbox0_hard[] = "#1d2021"; // Background (black) -static const char col_gruvbox0_medium[] = "#282828"; -static const char col_gruvbox0_soft[] = "#32302f"; -static const char col_gruvbox7[] = "#a89984"; // White -static const char col_gruvbox8[] = "#928374"; -static const char col_gruvbox15[] = "#ebdbb2"; // White +static const char bg1[] = "#1c1e26"; +static const char bg2[] = "#2e303e"; + +static const char fg1[] = "#9da0a2"; +static const char fg2[] = "#dcdfe4"; + static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ /* -fn option overrides fonts[0]; default X11 font or font set */ static const char *fonts[] = { - "monospace:size=10" + "castella:size=12" }; static const char *prompt = NULL; /* -p option; prompt to the left of input field */ static const char *colors[SchemeLast][2] = { /* fg bg */ - [SchemeNorm] = { col_gruvbox7, col_gruvbox0_hard }, - [SchemeSel] = { col_gruvbox15, col_gruvbox0_medium }, + [SchemeNorm] = { fg1, bg1 }, + [SchemeSel] = { fg2, bg2 }, [SchemeOut] = { "#000000", "#00ffff" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ static unsigned int lines = 0; +/* -h option; minimum height of a menu line */ +static unsigned int lineheight = 28; +static unsigned int min_lineheight = 8; /* * Characters not considered part of a word while deleting words diff --git a/dmenu/config.h b/dmenu/config.h index 289e86a..c96adcc 100644 --- a/dmenu/config.h +++ b/dmenu/config.h @@ -1,29 +1,31 @@ /* See LICENSE file for copyright and license details. */ /* Default settings; can be overriden by command line. */ -// gruvbox -static const char col_gruvbox0_hard[] = "#1d2021"; // Background (black) -static const char col_gruvbox0_medium[] = "#282828"; -static const char col_gruvbox0_soft[] = "#32302f"; -static const char col_gruvbox7[] = "#a89984"; // White -static const char col_gruvbox8[] = "#928374"; -static const char col_gruvbox15[] = "#ebdbb2"; // White +static const char bg1[] = "#1c1e26"; +static const char bg2[] = "#2e303e"; + +static const char fg1[] = "#9da0a2"; +static const char fg2[] = "#dcdfe4"; + static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ /* -fn option overrides fonts[0]; default X11 font or font set */ static const char *fonts[] = { - "monospace:size=10" + "castella:size=12" }; static const char *prompt = NULL; /* -p option; prompt to the left of input field */ static const char *colors[SchemeLast][2] = { /* fg bg */ - [SchemeNorm] = { col_gruvbox7, col_gruvbox0_hard }, - [SchemeSel] = { col_gruvbox15, col_gruvbox0_medium }, + [SchemeNorm] = { fg1, bg1 }, + [SchemeSel] = { fg2, bg2 }, [SchemeOut] = { "#000000", "#00ffff" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ static unsigned int lines = 0; +/* -h option; minimum height of a menu line */ +static unsigned int lineheight = 28; +static unsigned int min_lineheight = 8; /* * Characters not considered part of a word while deleting words diff --git a/dmenu/dmenu.1 b/dmenu/dmenu.1 index 323f93c..f2a82b4 100644 --- a/dmenu/dmenu.1 +++ b/dmenu/dmenu.1 @@ -6,6 +6,8 @@ dmenu \- dynamic menu .RB [ \-bfiv ] .RB [ \-l .IR lines ] +.RB [ \-h +.IR height ] .RB [ \-m .IR monitor ] .RB [ \-p @@ -50,6 +52,9 @@ dmenu matches menu items case insensitively. .BI \-l " lines" dmenu lists items vertically, with the given number of lines. .TP +.BI \-h " height" +dmenu uses a menu line of at least 'height' pixels tall, but no less than 8. +.TP .BI \-m " monitor" dmenu is displayed on the monitor number supplied. Monitor numbers are starting from 0. diff --git a/dmenu/dmenu.c b/dmenu/dmenu.c index 65f25ce..b7f8843 100644 --- a/dmenu/dmenu.c +++ b/dmenu/dmenu.c @@ -15,6 +15,7 @@ #include #endif #include +#include #include "drw.h" #include "util.h" @@ -53,6 +54,10 @@ static XIC xic; static Drw *drw; static Clr *scheme[SchemeLast]; +/* Temporary arrays to allow overriding xresources values */ +static char *colortemp[4]; +static char *tempfonts; + #include "config.h" static int (*fstrncmp)(const char *, const char *, size_t) = strncmp; @@ -131,7 +136,7 @@ drawmenu(void) { unsigned int curpos; struct item *item; - int x = 0, y = 0, w; + int x = 0, y = 0, fh = drw->fonts->h, w; drw_setscheme(drw, scheme[SchemeNorm]); drw_rect(drw, 0, 0, mw, mh, 1, 1); @@ -148,7 +153,7 @@ drawmenu(void) curpos = TEXTW(text) - TEXTW(&text[cursor]); if ((curpos += lrpad / 2 - 1) < w) { drw_setscheme(drw, scheme[SchemeNorm]); - drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); + drw_rect(drw, x + curpos, 2 + (bh - fh) / 2, 2, fh - 4, 1, 0); } if (lines > 0) { @@ -601,14 +606,20 @@ setup(void) int a, di, n, area = 0; #endif /* init appearance */ - for (j = 0; j < SchemeLast; j++) - scheme[j] = drw_scm_create(drw, colors[j], 2); + for (j = 0; j < SchemeLast; j++) { + scheme[j] = drw_scm_create(drw, (const char**)colors[j], 2); + } + for (j = 0; j < SchemeOut; ++j) { + for (i = 0; i < 2; ++i) + free(colors[j][i]); + } clip = XInternAtom(dpy, "CLIPBOARD", False); utf8 = XInternAtom(dpy, "UTF8_STRING", False); /* calculate menu geometry */ bh = drw->fonts->h + 2; + bh = MAX(bh,lineheight); /* make a menu line AT LEAST 'lineheight' tall */ lines = MAX(lines, 0); mh = (lines + 1) * bh; #ifdef XINERAMA @@ -689,11 +700,46 @@ setup(void) static void usage(void) { - fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n" + fputs("usage: dmenu [-bfiv] [-l lines] [-h height] [-p prompt] [-fn font] [-m monitor]\n" " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr); exit(1); } +void +readxresources(void) { + XrmInitialize(); + + char* xrm; + if ((xrm = XResourceManagerString(drw->dpy))) { + char *type; + XrmDatabase xdb = XrmGetStringDatabase(xrm); + XrmValue xval; + + if (XrmGetResource(xdb, "dmenu.font", "*", &type, &xval)) + fonts[0] = strdup(xval.addr); + else + fonts[0] = strdup(fonts[0]); + if (XrmGetResource(xdb, "dmenu.background", "*", &type, &xval)) + colors[SchemeNorm][ColBg] = strdup(xval.addr); + else + colors[SchemeNorm][ColBg] = strdup(colors[SchemeNorm][ColBg]); + if (XrmGetResource(xdb, "dmenu.foreground", "*", &type, &xval)) + colors[SchemeNorm][ColFg] = strdup(xval.addr); + else + colors[SchemeNorm][ColFg] = strdup(colors[SchemeNorm][ColFg]); + if (XrmGetResource(xdb, "dmenu.selbackground", "*", &type, &xval)) + colors[SchemeSel][ColBg] = strdup(xval.addr); + else + colors[SchemeSel][ColBg] = strdup(colors[SchemeSel][ColBg]); + if (XrmGetResource(xdb, "dmenu.selforeground", "*", &type, &xval)) + colors[SchemeSel][ColFg] = strdup(xval.addr); + else + colors[SchemeSel][ColFg] = strdup(colors[SchemeSel][ColFg]); + + XrmDestroyDatabase(xdb); + } +} + int main(int argc, char *argv[]) { @@ -717,20 +763,24 @@ main(int argc, char *argv[]) /* these options take one argument */ else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */ lines = atoi(argv[++i]); + else if (!strcmp(argv[i], "-h")) { /* minimum height of one menu line */ + lineheight = atoi(argv[++i]); + lineheight = MAX(lineheight, min_lineheight); + } else if (!strcmp(argv[i], "-m")) mon = atoi(argv[++i]); else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */ prompt = argv[++i]; else if (!strcmp(argv[i], "-fn")) /* font or font set */ - fonts[0] = argv[++i]; + tempfonts = argv[++i]; else if (!strcmp(argv[i], "-nb")) /* normal background color */ - colors[SchemeNorm][ColBg] = argv[++i]; + colortemp[0] = argv[++i]; else if (!strcmp(argv[i], "-nf")) /* normal foreground color */ - colors[SchemeNorm][ColFg] = argv[++i]; + colortemp[1] = argv[++i]; else if (!strcmp(argv[i], "-sb")) /* selected background color */ - colors[SchemeSel][ColBg] = argv[++i]; + colortemp[2] = argv[++i]; else if (!strcmp(argv[i], "-sf")) /* selected foreground color */ - colors[SchemeSel][ColFg] = argv[++i]; + colortemp[3] = argv[++i]; else if (!strcmp(argv[i], "-w")) /* embedding window id */ embed = argv[++i]; else @@ -748,8 +798,23 @@ main(int argc, char *argv[]) die("could not get embedding window attributes: 0x%lx", parentwin); drw = drw_create(dpy, screen, root, wa.width, wa.height); - if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) + readxresources(); + /* Now we check whether to override xresources with commandline parameters */ + if ( tempfonts ) + fonts[0] = strdup(tempfonts); + if ( colortemp[0]) + colors[SchemeNorm][ColBg] = strdup(colortemp[0]); + if ( colortemp[1]) + colors[SchemeNorm][ColFg] = strdup(colortemp[1]); + if ( colortemp[2]) + colors[SchemeSel][ColBg] = strdup(colortemp[2]); + if ( colortemp[3]) + colors[SchemeSel][ColFg] = strdup(colortemp[3]); + + if (!drw_fontset_create(drw, (const char**)fonts, LENGTH(fonts))) die("no fonts could be loaded."); + + free(fonts[0]); lrpad = drw->fonts->h; #ifdef __OpenBSD__ diff --git a/dots/.Xresources b/dots/.Xresources new file mode 100644 index 0000000..7b77a73 --- /dev/null +++ b/dots/.Xresources @@ -0,0 +1,62 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! Gruvbox Material Dark +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +*background: #282828 +! medium +! *background: #282828 +! soft +! *background: #32302f + +*foreground: #d4be98 + +! Black + DarkGrey +*color0: #32302f +*color8: #32302f +! DarkRed + Red +*color1: #ea6962 +*color9: #ea6962 +! DarkGreen + Green +*color2: #a9b665 +*color10: #a9b665 +! DarkYellow + Yellow +*color3: #e78a4e +*color11: #e78a4e +! DarkBlue + Blue +*color4: #7daea3 +*color12: #7daea3 +! DarkMagenta + Magenta +*color5: #d3869b +*color13: #d3869b +! DarkCyan + Cyan +*color6: #89b482 +*color14: #89b482 +! LightGrey + White +*color7: #d4be98 +*color15: #d4be98 + +st.font: JetBrainsMono Nerd Font:pixelsize=15:antialias=true:autohint=true +st.color0: #282828 +st.color1: #ea6962 +st.color2: #a9b665 +st.color3: #d8a657 +st.color4: #7daea3 +st.color5: #d3869b +st.color6: #89b482 +st.color7: #d4be98 +st.color8: #928374 +st.color9: #ef938e +st.color10: #bbc585 +st.color11: #e1bb7e +st.color12: #9dc2ba +st.color13: #e1acbb +st.color14: #a7c7a2 +st.color15: #e2d3ba + +dwm.normbgcolor: #282828 +dwm.normbordercolor: #282828 +dwm.normfgcolor: #d4be98 +dwm.selbgcolor: #32302f +dwm.selbordercolor: #32302f +dwm.selfgcolor: #d4be98 + +*selbackground: #32302f diff --git a/dots/.config/polybar/config b/dots/.config/polybar/config new file mode 100644 index 0000000..8fc5b8e --- /dev/null +++ b/dots/.config/polybar/config @@ -0,0 +1,115 @@ +[colors] +bg = ${xrdb:background} +fg = ${xrdb:foreground} + +red = ${xrdb:color1} +orange = ${xrdb:color9} +blue = ${xrdb:color4} +purple = ${xrdb:color5} +reddish = ${xrdb:color1} + +[bar/top] +monitor = "HDMI-A-0" +bottom = false +background = ${colors.bg} +foreground = ${colors.fg} +font-0 = "castella:size=12;2" +font-1 = "waffle:size=12;2" +modules-left = ewmh separator title +modules-center = date +modules-right = pulseaudio +padding = 1 +height = 28 +module-margin = 1 + +[module/separator] +type = custom/text +content = | +content-foreground = ${colors.fg} + +[module/ewmh] +type = internal/xworkspaces + +icon-0 = 1; +icon-1 = 2; +icon-2 = 3; +icon-3 = 4; +icon-4 = 5; +icon-default =  + +format = + +label-monitor = %name% + +label-active = " " +label-active-foreground = ${colors.red} +label-active-background = ${colors.bg} + +label-occupied = " " +label-occupied-foreground = ${colors.orange} +label-occupied-background = ${colors.bg} + +label-urgent = "%icon% " +label-urgent-foreground = ${colors.reddish} +label-urgent-background = ${colors.bg} + +label-empty = "%icon% " +label-empty-foreground = ${colors.fg} +label-empty-background = ${colors.bg} + +label-active-padding = 0 +label-urgent-padding = 0 +label-occupied-padding = 0 +label-empty-padding = 0 + +[module/date] +type = internal/date + +; Seconds to sleep between updates +interval = 1.0 + +; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string +; NOTE: if you want to use syntax tags here you need to use %%{...} +date = %A, %d %B + +; Optional time format +time = %I:%M + +; if `date-alt` or `time-alt` is defined, clicking +; the module will toggle between formats +date-alt = "%A, %d %B %Y" +time-alt = "%k:%M:%S" + +format =