Browse Source

actual config (theme and keys)

dwm6.4
Ivan Polyakov 2 years ago
parent
commit
9a1340ea45
  1. 2
      Makefile
  2. 51
      config.def.h

2
Makefile

@ -26,7 +26,7 @@ dwm: ${OBJ} @@ -26,7 +26,7 @@ dwm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
rm -f dwm config.h ${OBJ} dwm-${VERSION}.tar.gz
dist: clean
mkdir -p dwm-${VERSION}

51
config.def.h

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <X11/XF86keysym.h>
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
@ -7,11 +9,21 @@ static const int showbar = 1; /* 0 means no bar */ @@ -7,11 +9,21 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
/* default theme
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";
*/
/* my theme */
static const char col_gray1[] = "#2e3440";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#9b3e46";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
@ -34,7 +46,7 @@ static const Rule rules[] = { @@ -34,7 +46,7 @@ static const Rule rules[] = {
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
static const Layout layouts[] = {
@ -45,23 +57,46 @@ static const Layout layouts[] = { @@ -45,23 +57,46 @@ 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} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
/* I use rofi instead of dmenu
* static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
*/
static const char *roficmd[] = { "rofi", "-show", "run", NULL };
static const char *termcmd[] = { "st", NULL };
/* up volume */
static const char *upvolcmd[] =
{ "/usr/bin/amixer", "set", "Master", "5%+", NULL };
/* down volume */
static const char *downvolcmd[] =
{ "/usr/bin/amixer", "set", "Master", "5%-", NULL };
/* toggle volume */
static const char *togglevolcmd[] =
{ "/usr/bin/amixer", "set", "Master", "toggle", NULL };
/* toggle microphone */
static const char *togglemiccmd[] =
{ "/usr/bin/amixer", "set", "Capture", "toggle", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ 0, XF86XK_AudioRaiseVolume, spawn, { .v = upvolcmd } },
{ 0, XF86XK_AudioLowerVolume, spawn, { .v = downvolcmd } },
{ 0, XF86XK_AudioMute, spawn, { .v = togglevolcmd } },
{ 0, XF86XK_AudioMicMute, spawn, { .v = togglemiccmd } },
{ MODKEY, XK_p, spawn, {.v = roficmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },

Loading…
Cancel
Save