diff --git a/dmenu/config.def.h b/dmenu/config.def.h index b18367b..289e86a 100644 --- a/dmenu/config.def.h +++ b/dmenu/config.def.h @@ -1,44 +1,25 @@ /* See LICENSE file for copyright and license details. */ /* Default settings; can be overriden by command line. */ -// !! TO SEE THE COLORS, PLEASE REFER TO https://www.nordtheme.com/docs/colors-and-palettes +// gruvbox +static const char col_gruvbox0_hard[] = "#1d2021"; // Background (black) +static const char col_gruvbox0_medium[] = "#282828"; +static const char col_gruvbox0_soft[] = "#32302f"; -// 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 col_gruvbox7[] = "#a89984"; // White +static const char col_gruvbox8[] = "#928374"; +static const char col_gruvbox15[] = "#ebdbb2"; // White 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=12" + "monospace:size=10" }; static const char *prompt = NULL; /* -p option; prompt to the left of input field */ static const char *colors[SchemeLast][2] = { /* fg bg */ - [SchemeNorm] = { col_nord5, col_nord0 }, - [SchemeSel] = { col_nord6, col_nord3 }, + [SchemeNorm] = { col_gruvbox7, col_gruvbox0_hard }, + [SchemeSel] = { col_gruvbox15, col_gruvbox0_medium }, [SchemeOut] = { "#000000", "#00ffff" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ diff --git a/dmenu/config.h b/dmenu/config.h index b18367b..289e86a 100644 --- a/dmenu/config.h +++ b/dmenu/config.h @@ -1,44 +1,25 @@ /* See LICENSE file for copyright and license details. */ /* Default settings; can be overriden by command line. */ -// !! TO SEE THE COLORS, PLEASE REFER TO https://www.nordtheme.com/docs/colors-and-palettes +// gruvbox +static const char col_gruvbox0_hard[] = "#1d2021"; // Background (black) +static const char col_gruvbox0_medium[] = "#282828"; +static const char col_gruvbox0_soft[] = "#32302f"; -// 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 col_gruvbox7[] = "#a89984"; // White +static const char col_gruvbox8[] = "#928374"; +static const char col_gruvbox15[] = "#ebdbb2"; // White 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=12" + "monospace:size=10" }; static const char *prompt = NULL; /* -p option; prompt to the left of input field */ static const char *colors[SchemeLast][2] = { /* fg bg */ - [SchemeNorm] = { col_nord5, col_nord0 }, - [SchemeSel] = { col_nord6, col_nord3 }, + [SchemeNorm] = { col_gruvbox7, col_gruvbox0_hard }, + [SchemeSel] = { col_gruvbox15, col_gruvbox0_medium }, [SchemeOut] = { "#000000", "#00ffff" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ diff --git a/dmenu/dmenu b/dmenu/dmenu index 1263507..ec50dfa 100755 Binary files a/dmenu/dmenu and b/dmenu/dmenu differ diff --git a/dots/.scripts/dmenucalc b/dots/.scripts/dmenucalc new file mode 100755 index 0000000..415d52e --- /dev/null +++ b/dots/.scripts/dmenucalc @@ -0,0 +1,10 @@ +#!/bin/sh + +docalc() { + res=$(true | dmenu -p "calc" | bc) + [ "$res" = "" ] && exit + next=$(printf "exit\nnext" | dmenu -p "calc;res=${res}") + [ "next" = "${next}" ] && docalc || exit +} + +docalc diff --git a/dots/.scripts/dwmscreenshot b/dots/.scripts/dwmscreenshot new file mode 100755 index 0000000..18d3523 --- /dev/null +++ b/dots/.scripts/dwmscreenshot @@ -0,0 +1,3 @@ +#!/bin/sh + +maim -s -u | xclip -selection clipboard -t image/png diff --git a/dots/.scripts/dwmstatus b/dots/.scripts/dwmstatus new file mode 100755 index 0000000..550ee93 --- /dev/null +++ b/dots/.scripts/dwmstatus @@ -0,0 +1,7 @@ +#!/bin/sh + +while : +do + xsetroot -name "$(date '+%a %d %b %H:%M')" + sleep 40 +done diff --git a/dots/.scripts/funccf b/dots/.scripts/funccf new file mode 100755 index 0000000..ef37baf --- /dev/null +++ b/dots/.scripts/funccf @@ -0,0 +1,7 @@ +#!/bin/sh + +# Recursively search my code folder for a specific folder + +cf() { + cd $(find ~/code -maxdepth 4 -type d -name "$1" -print | sed 1q) +} diff --git a/dots/.scripts/vmwareinit b/dots/.scripts/vmwareinit new file mode 100755 index 0000000..03f63c1 --- /dev/null +++ b/dots/.scripts/vmwareinit @@ -0,0 +1,10 @@ +#!/bin/bash + +sudo modprobe vmmon +sudo modprobe vmw_vmci + +sudo systemctl start vmware-hostd-certificates.service +sudo systemctl start vmware-hostd.service +sudo systemctl start vmware-networks-configuration.service +sudo systemctl start vmware-networks.service +sudo systemctl start vmware-usbarbitrator.service diff --git a/dots/.scripts/xorgsettings b/dots/.scripts/xorgsettings new file mode 100755 index 0000000..140f9b2 --- /dev/null +++ b/dots/.scripts/xorgsettings @@ -0,0 +1,7 @@ +#!/bin/sh + +# Disable annoying mouse accel +xinput --set-prop 13 'libinput Accel Speed' '-1' + +# Set refresh rate +xrandr --output HDMI-A-0 --mode 1920x1080 --rate 75 diff --git a/dwm/README b/dwm/README index 81a2322..95d4fd0 100644 --- a/dwm/README +++ b/dwm/README @@ -46,9 +46,3 @@ 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/) \ No newline at end of file diff --git a/dwm/config.def.h b/dwm/config.def.h index 3e56f4a..2b6bf0d 100644 --- a/dwm/config.def.h +++ b/dwm/config.def.h @@ -5,60 +5,31 @@ static const unsigned int borderpx = 2; /* 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" }; -static const char dmenufont[] = "monospace:size=12"; - +static const char *fonts[] = { "monospace:size=10" }; +static const char dmenufont[] = "monospace:size=10"; static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; static const char col_gray3[] = "#bbbbbb"; static const char col_gray4[] = "#eeeeee"; static const char col_cyan[] = "#005577"; -// !! TO SEE THE COLORS, PLEASE REFER TO https://www.nordtheme.com/docs/colors-and-palettes +// gruvbox +static const char col_gruvbox0_hard[] = "#1d2021"; // Background (black) +static const char col_gruvbox0_medium[] = "#282828"; +static const char col_gruvbox0_soft[] = "#32302f"; -// 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 col_gruvbox7[] = "#a89984"; // White +static const char col_gruvbox8[] = "#928374"; +static const char col_gruvbox15[] = "#ebdbb2"; // White static const char *colors[][3] = { - /* fg bg border */ - [SchemeNorm] = { col_nord5, col_nord0, col_nord0 }, - [SchemeSel] = { col_nord6, col_nord2, col_nord3 }, - - // text, bg, unused - [SchemeStatus] = { col_nord5, col_nord2, "#000000" }, // Statusbar right - - [SchemeTagsSel] = { col_nord6, col_nord2, "#000000" }, // Tagbar left selected - [SchemeTagsNorm] = { col_nord5, col_nord0, "#000000" }, // Tagbar left unselected - - [SchemeInfoSel] = { col_nord6, col_nord3, "#000000" }, // infobar middle selected - [SchemeInfoNorm] = { col_nord5, col_nord0, "#000000" }, // infobar middle unselected + /* fg bg border */ + [SchemeNorm] = { col_gruvbox7, col_gruvbox0_hard, col_gruvbox0_medium }, + [SchemeSel] = { col_gruvbox15, col_gruvbox0_medium, col_gruvbox0_soft }, }; /* tagging */ -static const char *tags[] = { "1>web", "2>code", "3>term", "4>files", "5>misc" }; +static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static const Rule rules[] = { /* xprop(1): @@ -77,9 +48,9 @@ static const int resizehints = 0; /* 1 means respect size hints in tiled resi static const Layout layouts[] = { /* symbol arrange function */ - { "[t]", tile }, /* first entry is default */ - { "[f]", NULL }, /* no layout function means floating behavior */ - { "[m]", monocle }, + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, }; /* key definitions */ @@ -95,15 +66,19 @@ static const Layout layouts[] = { /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-p", "run", NULL }; -static const char *calccmd[] = { "/bin/sh", "-c", "~/.scripts/dwm/dmenu/calc", NULL }; +static const char *dmenucmd[] = { "dmenu_run", "-p", "run", "-m", dmenumon, NULL }; static const char *termcmd[] = { "st", NULL }; +static const char *screenshotscript[] = { "/bin/sh", "-c", "~/.scripts/dwmscreenshot", NULL }; +static const char *calcscript[] = { "/bin/sh", "-c", "~/.scripts/dmenucalc", NULL }; + static Key keys[] = { /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY, XK_o, spawn, {.v = calccmd} }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, //{ MODKEY, XK_b, togglebar, {0} }, + { MODKEY|ShiftMask, XK_o, spawn, { .v = calcscript } }, + { MODKEY|ShiftMask, XK_p, spawn, { .v = screenshotscript } }, + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, + { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_i, incnmaster, {.i = +1 } }, @@ -115,7 +90,7 @@ static Key keys[] = { { MODKEY, XK_c, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - //{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, @@ -129,11 +104,11 @@ static Key keys[] = { TAGKEYS( XK_3, 2) TAGKEYS( XK_4, 3) TAGKEYS( XK_5, 4) - //TAGKEYS( XK_6, 5) - //TAGKEYS( XK_7, 6) - //TAGKEYS( XK_8, 7) - //TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, + TAGKEYS( XK_6, 5) + TAGKEYS( XK_7, 6) + TAGKEYS( XK_8, 7) + TAGKEYS( XK_9, 8) + { MODKEY|ShiftMask, XK_q, quit, {0} }, }; /* button definitions */ diff --git a/dwm/config.mk b/dwm/config.mk index 6d36cb7..7084c33 100644 --- a/dwm/config.mk +++ b/dwm/config.mk @@ -25,7 +25,7 @@ INCS = -I${X11INC} -I${FREETYPEINC} LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} # flags -CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} LDFLAGS = ${LIBS} diff --git a/dwm/drw.c b/dwm/drw.c index 8fd1ca4..4cdbcbe 100644 --- a/dwm/drw.c +++ b/dwm/drw.c @@ -95,6 +95,7 @@ drw_free(Drw *drw) { XFreePixmap(drw->dpy, drw->drawable); XFreeGC(drw->dpy, drw->gc); + drw_fontset_free(drw->fonts); free(drw); } diff --git a/dwm/dwm-colorbar-6.2.diff b/dwm/dwm-colorbar-6.2.diff deleted file mode 100644 index 91c067d..0000000 --- a/dwm/dwm-colorbar-6.2.diff +++ /dev/null @@ -1,68 +0,0 @@ -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); - } - } diff --git a/dwm/dwm.1 b/dwm/dwm.1 index 13b3729..ddc8321 100644 --- a/dwm/dwm.1 +++ b/dwm/dwm.1 @@ -33,7 +33,7 @@ dwm draws a small border around windows to indicate the focus state. .SH OPTIONS .TP .B \-v -prints version information to standard output, then exits. +prints version information to stderr, then exits. .SH USAGE .SS Status bar .TP diff --git a/dwm/dwm.c b/dwm/dwm.c index 0d1d2f7..664c527 100644 --- a/dwm/dwm.c +++ b/dwm/dwm.c @@ -59,7 +59,7 @@ /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -enum { SchemeNorm, SchemeSel, SchemeStatus, SchemeTagsSel, SchemeTagsNorm, SchemeInfoSel, SchemeInfoNorm }; /* color schemes */ +enum { SchemeNorm, SchemeSel }; /* color schemes */ enum { NetSupported, NetWMName, NetWMState, NetWMCheck, NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ @@ -169,6 +169,7 @@ static void focus(Client *c); static void focusin(XEvent *e); static void focusmon(const Arg *arg); static void focusstack(const Arg *arg); +static Atom getatomprop(Client *c, Atom prop); static int getrootptr(int *x, int *y); static long getstate(Window w); static int gettextprop(Window w, Atom atom, char *text, unsigned int size); @@ -439,7 +440,7 @@ buttonpress(XEvent *e) arg.ui = 1 << i; } else if (ev->x < x + blw) click = ClkLtSymbol; - else if (ev->x > selmon->ww - TEXTW(stext)) + else if (ev->x > selmon->ww - (int)TEXTW(stext)) click = ClkStatusText; else click = ClkWinTitle; @@ -695,7 +696,7 @@ dirtomon(int dir) void drawbar(Monitor *m) { - int x, w, sw = 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; @@ -703,9 +704,9 @@ 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[SchemeStatus]); - sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */ - drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0); + drw_setscheme(drw, scheme[SchemeNorm]); + tw = TEXTW(stext) - lrpad + 2; /* 2px right padding */ + drw_text(drw, m->ww - tw, 0, tw, bh, 0, stext, 0); } for (c = m->clients; c; c = c->next) { @@ -716,7 +717,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 ? SchemeTagsSel : SchemeTagsNorm]); + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); 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 +726,17 @@ drawbar(Monitor *m) x += w; } w = blw = TEXTW(m->ltsymbol); - drw_setscheme(drw, scheme[SchemeTagsNorm]); + drw_setscheme(drw, scheme[SchemeNorm]); x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); - if ((w = m->ww - sw - x) > bh) { + if ((w = m->ww - tw - x) > bh) { if (m->sel) { - drw_setscheme(drw, scheme[m == selmon ? SchemeInfoSel : SchemeInfoNorm]); + drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); 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[SchemeInfoNorm]); + drw_setscheme(drw, scheme[SchemeNorm]); drw_rect(drw, x, 0, w, bh, 1, 1); } } @@ -1520,7 +1521,7 @@ setmfact(const Arg *arg) if (!arg || !selmon->lt[selmon->sellt]->arrange) return; f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; - if (f < 0.1 || f > 0.9) + if (f < 0.05 || f > 0.95) return; selmon->mfact = f; arrange(selmon); @@ -1688,11 +1689,13 @@ tile(Monitor *m) if (i < m->nmaster) { h = (m->wh - my) / (MIN(n, m->nmaster) - i); resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); - my += HEIGHT(c); + if (my + HEIGHT(c) < m->wh) + my += HEIGHT(c); } else { h = (m->wh - ty) / (n - i); resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); - ty += HEIGHT(c); + if (ty + HEIGHT(c) < m->wh) + ty += HEIGHT(c); } } diff --git a/st/config.def.h b/st/config.def.h index 1f2a9e2..a483587 100644 --- a/st/config.def.h +++ b/st/config.def.h @@ -95,31 +95,25 @@ unsigned int tabspaces = 8; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { - /* 8 normal colors */ - "#3b4252", /* black */ - "#bf616a", /* red */ - "#a3be8c", /* green */ - "#ebcb8b", /* yellow */ - "#81a1c1", /* blue */ - "#b48ead", /* magenta */ - "#88c0d0", /* cyan */ - "#e5e9f0", /* white */ + /* 8 normal colors */ + [0] = "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */ + [1] = "#cc241d", /* red */ + [2] = "#98971a", /* green */ + [3] = "#d79921", /* yellow */ + [4] = "#458588", /* blue */ + [5] = "#b16286", /* magenta */ + [6] = "#689d6a", /* cyan */ + [7] = "#a89984", /* white */ - /* 8 bright colors */ - "#4c566a", /* black */ - "#bf616a", /* red */ - "#a3be8c", /* green */ - "#ebcb8b", /* yellow */ - "#81a1c1", /* blue */ - "#b48ead", /* magenta */ - "#8fbcbb", /* cyan */ - "#eceff4", /* white */ - - [255] = 0, - - /* more colors can be added after 255 to use with DefaultXX */ - "#2e3440", /* background */ - "#d8dee9", /* foreground */ + /* 8 bright colors */ + [8] = "#928374", /* black */ + [9] = "#fb4934", /* red */ + [10] = "#b8bb26", /* green */ + [11] = "#fabd2f", /* yellow */ + [12] = "#83a598", /* blue */ + [13] = "#d3869b", /* magenta */ + [14] = "#8ec07c", /* cyan */ + [15] = "#ebdbb2", /* white */ }; @@ -127,11 +121,10 @@ static const char *colorname[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -unsigned int defaultfg = 257; -unsigned int defaultbg = 256; -static unsigned int defaultcs = 257; +static unsigned int defaultcs = 15; static unsigned int defaultrcs = 257; - +unsigned int defaultfg = 15; +unsigned int defaultbg = 0; static const int resizehints = 0; /* diff --git a/st/st-gruvbox-dark-0.8.2.diff b/st/st-gruvbox-dark-0.8.2.diff new file mode 100644 index 0000000..c8390f0 --- /dev/null +++ b/st/st-gruvbox-dark-0.8.2.diff @@ -0,0 +1,70 @@ +diff --git a/config.def.h b/config.def.h +index 877afab..6a1699f 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -84,41 +84,35 @@ static unsigned int tabspaces = 8; + + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { +- /* 8 normal colors */ +- "black", +- "red3", +- "green3", +- "yellow3", +- "blue2", +- "magenta3", +- "cyan3", +- "gray90", +- +- /* 8 bright colors */ +- "gray50", +- "red", +- "green", +- "yellow", +- "#5c5cff", +- "magenta", +- "cyan", +- "white", +- +- [255] = 0, +- +- /* more colors can be added after 255 to use with DefaultXX */ +- "#cccccc", +- "#555555", +-}; + ++ /* 8 normal colors */ ++ [0] = "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */ ++ [1] = "#cc241d", /* red */ ++ [2] = "#98971a", /* green */ ++ [3] = "#d79921", /* yellow */ ++ [4] = "#458588", /* blue */ ++ [5] = "#b16286", /* magenta */ ++ [6] = "#689d6a", /* cyan */ ++ [7] = "#a89984", /* white */ ++ ++ /* 8 bright colors */ ++ [8] = "#928374", /* black */ ++ [9] = "#fb4934", /* red */ ++ [10] = "#b8bb26", /* green */ ++ [11] = "#fabd2f", /* yellow */ ++ [12] = "#83a598", /* blue */ ++ [13] = "#d3869b", /* magenta */ ++ [14] = "#8ec07c", /* cyan */ ++ [15] = "#ebdbb2", /* white */ ++}; + + /* + * Default colors (colorname index) +- * foreground, background, cursor, reverse cursor ++ * foreground, background, cursor + */ +-unsigned int defaultfg = 7; +-unsigned int defaultbg = 0; +-static unsigned int defaultcs = 256; ++unsigned int defaultfg = 15; ++unsigned int defaultbg = 0; ++static unsigned int defaultcs = 15; + static unsigned int defaultrcs = 257; + + /*