config: Update dwm config as per our requirements

On start up, do the following
1. Invoke feh and set up wallpaper
2. Start slstatus for status bar
3. Start picom for transparency
4. Set up keyboard layout

Update key bindings for
1. Quitting dwm
2. Add ones for taking screen shot
3. MODKEY using SUPER instead of ALT
4. Spawning terminal
5. zoom

We switch to using JetBrains Mono for the font as default.
This commit is contained in:
Sanchayan Maity 2020-11-08 12:17:35 +05:30
parent c8d0c2af35
commit dd98add343
1 changed files with 16 additions and 7 deletions

View File

@ -6,8 +6,8 @@ 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 double defaultopacity = 0.75;
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char *fonts[] = { "JetBrains Mono:size=14" };
static const char dmenufont[] = "JetBrains Mono:size=12";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@ -20,7 +20,14 @@ static const char *colors[][3] = {
};
static const char *const autostart[] = {
"st", NULL,
"feh", "--no-fehbg", "--bg-scale", "--randomize", "/home/core/Wallpapers", NULL,
"slstatus", NULL,
"picom", "--config", "/home/core/.config/picom/picom.conf", "-b", NULL,
/*
* This is required for work laptop where we screwed up keyboard
* config
*/
"setxkbmap", "-model", "pc105", "-layout", "us", "-option", "caps:escape", NULL,
NULL /* terminate */
};
@ -51,7 +58,7 @@ static const Layout layouts[] = {
};
/* key definitions */
#define MODKEY Mod1Mask
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
@ -69,10 +76,12 @@ static const char *termcmd[] = { "st", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("transset-df -a --dec .1") },
{ MODKEY|ShiftMask, XK_d, spawn, SHCMD("transset-df -a --inc .1") },
{ MODKEY|ShiftMask, XK_f, spawn, SHCMD("transset-df -a .75") },
{ MODKEY, XK_Print, spawn, SHCMD("dwm-scrot -w") },
{ MODKEY|ShiftMask, XK_Print, spawn, SHCMD("dwm-scrot -s") },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
@ -80,7 +89,7 @@ static Key keys[] = {
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
@ -103,7 +112,7 @@ static Key keys[] = {
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ShiftMask|ControlMask, XK_q, quit, {0} },
};
/* button definitions */