gruvbox layout

This commit is contained in:
Bryson Steck 2022-04-14 19:04:46 -06:00
parent 83ef57559a
commit daf0fff860
2 changed files with 30 additions and 29 deletions

View file

@ -1,22 +1,17 @@
/* See LICENSE file for copyright and license details. */ /* See LICENSE file for copyright and license details. */
/* appearance */ /* appearance */
static const unsigned int borderpx = 5; /* border pixel of windows */ static const unsigned int borderpx = 0; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */ static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 0; /* 0 means bottom bar */ static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "Inter-Bold:size=12", "emoji:size=12" }; static const char *fonts[] = { "Manrope:style=bold:size=13", "emoji:size=12" };
static const char dmenufont[] = "Inter-Bold:size=12"; static const char dmenufont[] = "Manrope:style=bold:size=13";
//static const char *fonts[] = { "ComicMono:size=12", "emoji:size=12" }; static const char fg[] = "#ebdbb2";
//static const char dmenufont[] = "ComicMono:size=12"; static const char bg_normal[] = "#3c3836";
static const char col_black[] = "#000000"; static const char dr_normal[] = "#282828";
static const char col_black_border[] = "#101010"; static const char bg_selected[] = "#504945";
static const char col_gray1[] = "#222222"; static const char dr_selected[] = "#ebdbb2";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_nord4[] = "#d8dee9";
static const char col_blue[] = "#144982";
static const unsigned int gappx = 6; static const unsigned int gappx = 6;
/* Display modes of the tab bar: never shown, always shown, shown only in */ /* Display modes of the tab bar: never shown, always shown, shown only in */
/* monocle mode in the presence of several windows. */ /* monocle mode in the presence of several windows. */
@ -27,12 +22,12 @@ static const int toptab = False; /* False means bottom tab bar
static const char *colors[][3] = { static const char *colors[][3] = {
/* fg bg border */ /* fg bg border */
[SchemeNorm] = { col_nord4, col_black, col_black_border }, [SchemeNorm] = { fg, bg_normal, dr_normal },
[SchemeSel] = { col_nord4, col_gray1, col_blue }, [SchemeSel] = { fg, bg_selected, dr_selected },
}; };
/* tagging */ /* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8" }; static const char *tags[] = { "1", "2", "3", "4", "5", "6" };
static const Rule rules[] = { static const Rule rules[] = {
/* xprop(1): /* xprop(1):
@ -60,12 +55,12 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win
static const Layout layouts[] = { static const Layout layouts[] = {
/* symbol arrange function */ /* symbol arrange function */
{ "t", tile }, /* first entry is default */ { "t", tile }, /* first entry is default */
{ "f", NULL }, /* no layout function means floating behavior */ { "FL", NULL }, /* no layout function means floating behavior */
{ "m", monocle }, { "m", monocle },
}; };
/* key definitions */ /* key definitions */
#define MODKEY Mod1Mask #define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \ #define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
@ -77,10 +72,10 @@ static const Layout layouts[] = {
/* commands */ /* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run_history", "-b", "-m", dmenumon, "-fn", dmenufont, "-nb", col_black, "-nf", col_gray3, "-sb", col_blue, "-sf", col_gray4, NULL }; static const char *dmenucmd[] = { "dmenu_run_history", "-m", dmenumon, "-fn", dmenufont, "-nb", bg_normal, "-nf", fg, "-sb", bg_selected, "-sf", fg, NULL };
static const char *termcmd[] = { "spawn-alacritty.sh", NULL }; static const char *termcmd[] = { "spawn-alacritty.sh", NULL };
static const char *brightnessup[] = { "brightness-up", NULL }; static const char *brightnessup[] = { "brightness-up.sh", NULL };
static const char *brightnessdown[] = { "brightness-down", NULL }; static const char *brightnessdown[] = { "brightness-down.sh", NULL };
static const char *screenshooter[] = { "screenshot.sh", NULL }; static const char *screenshooter[] = { "screenshot.sh", NULL };
static const char *volup[] = { "volup.sh", NULL }; static const char *volup[] = { "volup.sh", NULL };
static const char *voldown[] = { "voldown.sh", NULL }; static const char *voldown[] = { "voldown.sh", NULL };

6
dwm.c
View file

@ -93,6 +93,7 @@ struct Client {
int bw, oldbw; int bw, oldbw;
unsigned int tags; unsigned int tags;
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
int issteam;
Client *next; Client *next;
Client *snext; Client *snext;
Monitor *mon; Monitor *mon;
@ -307,6 +308,9 @@ applyrules(Client *c)
class = ch.res_class ? ch.res_class : broken; class = ch.res_class ? ch.res_class : broken;
instance = ch.res_name ? ch.res_name : broken; instance = ch.res_name ? ch.res_name : broken;
if (strstr(class, "Steam") || strstr(class, "steam_app_"))
c->issteam = 1;
for (i = 0; i < LENGTH(rules); i++) { for (i = 0; i < LENGTH(rules); i++) {
r = &rules[i]; r = &rules[i];
if ((!r->title || strstr(c->name, r->title)) if ((!r->title || strstr(c->name, r->title))
@ -625,6 +629,7 @@ configurerequest(XEvent *e)
c->bw = ev->border_width; c->bw = ev->border_width;
else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) { else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) {
m = c->mon; m = c->mon;
if (!c->issteam) {
if (ev->value_mask & CWX) { if (ev->value_mask & CWX) {
c->oldx = c->x; c->oldx = c->x;
c->x = m->mx + ev->x; c->x = m->mx + ev->x;
@ -633,6 +638,7 @@ configurerequest(XEvent *e)
c->oldy = c->y; c->oldy = c->y;
c->y = m->my + ev->y; c->y = m->my + ev->y;
} }
}
if (ev->value_mask & CWWidth) { if (ev->value_mask & CWWidth) {
c->oldw = c->w; c->oldw = c->w;
c->w = ev->width; c->w = ev->width;