Compare commits
17 Commits
ea4b6f32ea
...
d2c66c146e
| Author | SHA1 | Date |
|---|---|---|
|
|
d2c66c146e | |
|
|
a5077d6a74 | |
|
|
23c1ec98a4 | |
|
|
bf359cd131 | |
|
|
edb218805f | |
|
|
92493c4ddf | |
|
|
87f69c027b | |
|
|
d9dfdcf0ae | |
|
|
54595af8fd | |
|
|
c95de45613 | |
|
|
f37cd53557 | |
|
|
ec9c475986 | |
|
|
8b06991e7f | |
|
|
d0236d7daa | |
|
|
0e87fa42f6 | |
|
|
07dad8fb84 | |
|
|
58c8a95346 |
122
config.def.h
122
config.def.h
|
|
@ -1,24 +1,45 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
/* appearance */
|
/*
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
* Appearance
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
*/
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static unsigned int snap = 32; /* snap pixel */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static char *fonts[] = { "monospace:size=14" };
|
||||||
static const char *fonts[] = { "monospace:size=10" };
|
static unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static const char dmenufont[] = "monospace:size=10";
|
static char normbgcolor[] = "#222222";
|
||||||
static const char col_gray1[] = "#222222";
|
static char normbordercolor[] = "#444444";
|
||||||
static const char col_gray2[] = "#444444";
|
static char normfgcolor[] = "#bbbbbb";
|
||||||
static const char col_gray3[] = "#bbbbbb";
|
static char selfgcolor[] = "#eeeeee";
|
||||||
static const char col_gray4[] = "#eeeeee";
|
static char selbordercolor[] = "#005577";
|
||||||
static const char col_cyan[] = "#005577";
|
static char selbgcolor[] = "#005577";
|
||||||
static const char *colors[][3] = {
|
|
||||||
/* fg bg border */
|
/* color schemes */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
static char *colors[][3] = {
|
||||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
/* fg bg border */
|
||||||
|
[SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },
|
||||||
|
[SchemeSel] = { selfgcolor, selbgcolor, selbordercolor },
|
||||||
|
[SchemeTabActive] = { selfgcolor, normbgcolor, selbordercolor },
|
||||||
|
[SchemeTabInactive] = { normfgcolor, normbgcolor, normbordercolor }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/*
|
||||||
|
* Bar configuration
|
||||||
|
*/
|
||||||
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Systray
|
||||||
|
*/
|
||||||
|
static const int showsystray = 1; /* 0 means no systray */
|
||||||
|
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||||
|
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
|
||||||
|
static const unsigned int systrayspacing = 2; /* systray spacing */
|
||||||
|
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Tagging
|
||||||
|
*/
|
||||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
|
|
@ -31,12 +52,25 @@ static const Rule rules[] = {
|
||||||
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
|
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* layout(s) */
|
/*
|
||||||
|
* Layout(s)
|
||||||
|
*/
|
||||||
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
|
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 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 = 1; /* 1 means respect size hints in tiled resizals */
|
||||||
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bartabgroups properties
|
||||||
|
*/
|
||||||
|
#define BARTAB_BORDERS 1 // 0 = off, 1 = on
|
||||||
|
#define BARTAB_BOTTOMBORDER 1 // 0 = off, 1 = on
|
||||||
|
#define BARTAB_TAGSINDICATOR 1 // 0 = off, 1 = on if >1 client/view tag, 2 = always on
|
||||||
|
#define BARTAB_TAGSPX 5 // # pixels for tag grid boxes
|
||||||
|
#define BARTAB_TAGSROWS 3 // # rows in tag grid (9 tags, e.g. 3x3)
|
||||||
|
static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ };
|
||||||
|
static void (*bartabfloatfns[])(Monitor *) = { NULL /* , customlayoutfn */ };
|
||||||
|
|
||||||
static const Layout layouts[] = {
|
static const Layout layouts[] = {
|
||||||
/* symbol arrange function */
|
/* symbol arrange function */
|
||||||
{ "[]=", tile }, /* first entry is default */
|
{ "[]=", tile }, /* first entry is default */
|
||||||
|
|
@ -44,7 +78,9 @@ static const Layout layouts[] = {
|
||||||
{ "[M]", monocle },
|
{ "[M]", monocle },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* key definitions */
|
/*
|
||||||
|
* Key definitions
|
||||||
|
*/
|
||||||
#define MODKEY Mod1Mask
|
#define MODKEY Mod1Mask
|
||||||
#define TAGKEYS(KEY,TAG) \
|
#define TAGKEYS(KEY,TAG) \
|
||||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
|
|
@ -54,37 +90,64 @@ static const Layout layouts[] = {
|
||||||
|
|
||||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
/*
|
||||||
|
* Xresources preferences to load at startup
|
||||||
|
*/
|
||||||
|
ResourcePref resources[] = {
|
||||||
|
{ "normbgcolor", STRING, &normbgcolor },
|
||||||
|
{ "normbordercolor", STRING, &normbordercolor },
|
||||||
|
{ "normfgcolor", STRING, &normfgcolor },
|
||||||
|
{ "selbgcolor", STRING, &selbgcolor },
|
||||||
|
{ "selbordercolor", STRING, &selbordercolor },
|
||||||
|
{ "selfgcolor", STRING, &selfgcolor },
|
||||||
|
{ "borderpx", INTEGER, &borderpx },
|
||||||
|
};
|
||||||
|
|
||||||
/* 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", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL };
|
||||||
static const char *termcmd[] = { "st", NULL };
|
static const char *termcmd[] = { "st", NULL };
|
||||||
|
|
||||||
static const Key keys[] = {
|
|
||||||
|
static Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
|
|
||||||
|
/* spawn programs */
|
||||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
|
|
||||||
|
/* window manager controls */
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
|
||||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
|
||||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
|
||||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
{ 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, XK_space, setlayout, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
|
||||||
|
|
||||||
|
/* window management */
|
||||||
|
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||||
|
|
||||||
|
/* monitor navigation */
|
||||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
|
|
||||||
|
/* tags */
|
||||||
TAGKEYS( XK_1, 0)
|
TAGKEYS( XK_1, 0)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_2, 1)
|
||||||
TAGKEYS( XK_3, 2)
|
TAGKEYS( XK_3, 2)
|
||||||
|
|
@ -94,7 +157,6 @@ static const Key keys[] = {
|
||||||
TAGKEYS( XK_7, 6)
|
TAGKEYS( XK_7, 6)
|
||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
|
|
@ -103,6 +165,8 @@ static const Button buttons[] = {
|
||||||
/* click event mask button function argument */
|
/* click event mask button function argument */
|
||||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||||
|
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||||
|
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||||
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,204 @@
|
||||||
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Appearance
|
||||||
|
*/
|
||||||
|
static unsigned int snap = 32; /* snap pixel */
|
||||||
|
static char *fonts[] = { "Iosevka Term:size=14" };
|
||||||
|
static unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
|
static char normbgcolor[] = "#222222";
|
||||||
|
static char normbordercolor[] = "#444444";
|
||||||
|
static char normfgcolor[] = "#bbbbbb";
|
||||||
|
static char selfgcolor[] = "#eeeeee";
|
||||||
|
static char selbordercolor[] = "#005577";
|
||||||
|
static char selbgcolor[] = "#005577";
|
||||||
|
|
||||||
|
/* color schemes */
|
||||||
|
static char *colors[][3] = {
|
||||||
|
/* fg bg border */
|
||||||
|
[SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },
|
||||||
|
[SchemeSel] = { selfgcolor, selbgcolor, selbordercolor },
|
||||||
|
[SchemeTabActive] = { selfgcolor, normbgcolor, selbordercolor },
|
||||||
|
[SchemeTabInactive] = { normfgcolor, normbgcolor, normbordercolor }
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bar configuration
|
||||||
|
*/
|
||||||
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Systray
|
||||||
|
*/
|
||||||
|
static const int showsystray = 1; /* 0 means no systray */
|
||||||
|
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||||
|
static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
|
||||||
|
static const unsigned int systrayspacing = 2; /* systray spacing */
|
||||||
|
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Tagging
|
||||||
|
*/
|
||||||
|
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
|
|
||||||
|
static const Rule rules[] = {
|
||||||
|
/* xprop(1):
|
||||||
|
* WM_CLASS(STRING) = instance, class
|
||||||
|
* WM_NAME(STRING) = title
|
||||||
|
*/
|
||||||
|
/* class instance title tags mask isfloating monitor */
|
||||||
|
{ "Emacs", NULL, NULL, 1 << 0, 0, -1 },
|
||||||
|
{ "Firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||||
|
{ "st", NULL, NULL, 1 << 2, 0, -1 },
|
||||||
|
{ "Slack", NULL, NULL, 1 << 3, 0, -1 },
|
||||||
|
{ "discord", NULL, NULL, 1 << 3, 0, -1 },
|
||||||
|
{ "Signal", NULL, NULL, 1 << 3, 0, -1 },
|
||||||
|
{ "Spotify", NULL, NULL, 1 << 4, 0, -1 },
|
||||||
|
{ "vlc", NULL, NULL, 1 << 5, 0, -1 },
|
||||||
|
{ "1Password", NULL, NULL, 1 << 6, 0, -1 },
|
||||||
|
{ "Zoom", NULL, NULL, 0, 1, -1 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bartabgroups properties
|
||||||
|
*/
|
||||||
|
#define BARTAB_BORDERS 1 // 0 = off, 1 = on
|
||||||
|
#define BARTAB_BOTTOMBORDER 0 // 0 = off, 1 = on
|
||||||
|
#define BARTAB_TAGSINDICATOR 1 // 0 = off, 1 = on if >1 client/view tag, 2 = always on
|
||||||
|
#define BARTAB_TAGSPX 5 // # pixels for tag grid boxes
|
||||||
|
#define BARTAB_TAGSROWS 3 // # rows in tag grid (9 tags, e.g. 3x3)
|
||||||
|
static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ };
|
||||||
|
static void (*bartabfloatfns[])(Monitor *) = { NULL /* , customlayoutfn */ };
|
||||||
|
|
||||||
|
static const Layout layouts[] = {
|
||||||
|
/* symbol arrange function */
|
||||||
|
{ "[]=", tile }, /* first entry is default */
|
||||||
|
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||||
|
{ "[M]", monocle },
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Xresources preferences to load at startup
|
||||||
|
*/
|
||||||
|
ResourcePref resources[] = {
|
||||||
|
{ "normbgcolor", STRING, &normbgcolor },
|
||||||
|
{ "normbordercolor", STRING, &normbordercolor },
|
||||||
|
{ "normfgcolor", STRING, &normfgcolor },
|
||||||
|
{ "selbgcolor", STRING, &selbgcolor },
|
||||||
|
{ "selbordercolor", STRING, &selbordercolor },
|
||||||
|
{ "selfgcolor", STRING, &selfgcolor },
|
||||||
|
{ "borderpx", INTEGER, &borderpx },
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Key definitions
|
||||||
|
*/
|
||||||
|
#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} },
|
||||||
|
|
||||||
|
/* 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 char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||||
|
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL };
|
||||||
|
static const char *termcmd[] = { "st", NULL };
|
||||||
|
|
||||||
|
static Key keys[] = {
|
||||||
|
/* modifier key function argument */
|
||||||
|
|
||||||
|
/* spawn programs */
|
||||||
|
{ MODKEY, XK_t, spawn, {.v = dmenucmd } },
|
||||||
|
{ MODKEY, XK_a, spawn, {.v = termcmd } },
|
||||||
|
{ MODKEY, XK_g, spawn, SHCMD("emacsclient -c") },
|
||||||
|
{ MODKEY|ShiftMask, XK_g, spawn, SHCMD("emacs") },
|
||||||
|
{ MODKEY, XK_s, spawn, SHCMD("pass-dmenu type") },
|
||||||
|
{ MODKEY|ShiftMask, XK_S, spawn, SHCMD("pass-dmenu clip") },
|
||||||
|
|
||||||
|
/* window manager controls */
|
||||||
|
{ MODKEY|ControlMask, XK_q, spawn, SHCMD("dmenu-sys") },
|
||||||
|
{ MODKEY|ControlMask, XK_z, togglebar, {0} },
|
||||||
|
{ MODKEY|ControlMask, XK_l, incnmaster, {.i = -1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_u, incnmaster, {.i = +1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_m, setmfact, {.f = -0.05} },
|
||||||
|
{ MODKEY|ControlMask, XK_i, setmfact, {.f = +0.05} },
|
||||||
|
{ MODKEY, XK_w, setlayout, {.v = &layouts[0]} },
|
||||||
|
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||||
|
{ MODKEY, XK_p, setlayout, {.v = &layouts[2]} },
|
||||||
|
{ MODKEY, XK_space, setlayout, {0} },
|
||||||
|
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
|
||||||
|
|
||||||
|
/* window management */
|
||||||
|
{ MODKEY, XK_n, focusstack, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_e, focusstack, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_m, zoom, {0} },
|
||||||
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||||
|
{ MODKEY, XK_x, togglefloating, {0} },
|
||||||
|
{ MODKEY, XK_q, killclient, {0} },
|
||||||
|
|
||||||
|
/* monitor navigation */
|
||||||
|
{ MODKEY, XK_comma, focusmon, {.i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = +1 } },
|
||||||
|
|
||||||
|
/* system managemment */
|
||||||
|
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer --toggle-mute") },
|
||||||
|
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 5") },
|
||||||
|
{ ShiftMask, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 10") },
|
||||||
|
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 5") },
|
||||||
|
{ ShiftMask, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 10") },
|
||||||
|
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("sudo light -A 5") },
|
||||||
|
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("sudo light -U 5") },
|
||||||
|
{ 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause") },
|
||||||
|
{ 0, XF86XK_AudioNext, spawn, SHCMD("playerctl next") },
|
||||||
|
{ 0, XF86XK_AudioPrev, spawn, SHCMD("playerctl previous") },
|
||||||
|
{ 0, XF86XK_Display, spawn, SHCMD("autorandr --change") },
|
||||||
|
|
||||||
|
/* tags */
|
||||||
|
TAGKEYS( XK_1, 0)
|
||||||
|
TAGKEYS( XK_2, 1)
|
||||||
|
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)
|
||||||
|
};
|
||||||
|
|
||||||
|
/* button definitions */
|
||||||
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||||
|
static const Button buttons[] = {
|
||||||
|
/* click event mask button function argument */
|
||||||
|
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||||
|
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||||
|
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||||
|
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||||
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||||
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||||
|
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||||
|
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||||
|
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||||
|
{ ClkTagBar, 0, Button1, view, {0} },
|
||||||
|
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||||
|
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||||
|
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||||
|
};
|
||||||
|
|
||||||
6
drw.c
6
drw.c
|
|
@ -154,7 +154,7 @@ xfont_free(Fnt *font)
|
||||||
}
|
}
|
||||||
|
|
||||||
Fnt*
|
Fnt*
|
||||||
drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
|
drw_fontset_create(Drw* drw, char *fonts[], size_t fontcount)
|
||||||
{
|
{
|
||||||
Fnt *cur, *ret = NULL;
|
Fnt *cur, *ret = NULL;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
@ -190,12 +190,14 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
|
||||||
DefaultColormap(drw->dpy, drw->screen),
|
DefaultColormap(drw->dpy, drw->screen),
|
||||||
clrname, dest))
|
clrname, dest))
|
||||||
die("error, cannot allocate color '%s'", clrname);
|
die("error, cannot allocate color '%s'", clrname);
|
||||||
|
|
||||||
|
dest->pixel |= 0xff << 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
/* Wrapper to create color schemes. The caller has to call free(3) on the
|
||||||
* returned color scheme when done using it. */
|
* returned color scheme when done using it. */
|
||||||
Clr *
|
Clr *
|
||||||
drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
|
drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
Clr *ret;
|
Clr *ret;
|
||||||
|
|
|
||||||
5
drw.h
5
drw.h
|
|
@ -32,7 +32,8 @@ void drw_resize(Drw *drw, unsigned int w, unsigned int h);
|
||||||
void drw_free(Drw *drw);
|
void drw_free(Drw *drw);
|
||||||
|
|
||||||
/* Fnt abstraction */
|
/* Fnt abstraction */
|
||||||
Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
|
Fnt *drw_fontset_create(Drw* drw, char *fonts[], size_t fontcount);
|
||||||
|
|
||||||
void drw_fontset_free(Fnt* set);
|
void drw_fontset_free(Fnt* set);
|
||||||
unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
|
unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
|
||||||
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
|
unsigned int drw_fontset_getwidth_clamp(Drw *drw, const char *text, unsigned int n);
|
||||||
|
|
@ -40,7 +41,7 @@ void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned in
|
||||||
|
|
||||||
/* Colorscheme abstraction */
|
/* Colorscheme abstraction */
|
||||||
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
|
void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
|
||||||
Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
|
Clr *drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount);
|
||||||
|
|
||||||
/* Cursor abstraction */
|
/* Cursor abstraction */
|
||||||
Cur *drw_cur_create(Drw *drw, int shape);
|
Cur *drw_cur_create(Drw *drw, int shape);
|
||||||
|
|
|
||||||
10
dwm.1
10
dwm.1
|
|
@ -150,6 +150,9 @@ Add/remove all windows with nth tag to/from the view.
|
||||||
.TP
|
.TP
|
||||||
.B Mod1\-Shift\-q
|
.B Mod1\-Shift\-q
|
||||||
Quit dwm.
|
Quit dwm.
|
||||||
|
.TP
|
||||||
|
.B Mod1\-Control\-Shift\-q
|
||||||
|
Restart dwm.
|
||||||
.SS Mouse commands
|
.SS Mouse commands
|
||||||
.TP
|
.TP
|
||||||
.B Mod1\-Button1
|
.B Mod1\-Button1
|
||||||
|
|
@ -178,6 +181,13 @@ This file is started before any autostart.sh; dwm waits for its termination.
|
||||||
.SH CUSTOMIZATION
|
.SH CUSTOMIZATION
|
||||||
dwm is customized by creating a custom config.h and (re)compiling the source
|
dwm is customized by creating a custom config.h and (re)compiling the source
|
||||||
code. This keeps it fast, secure and simple.
|
code. This keeps it fast, secure and simple.
|
||||||
|
.SH SIGNALS
|
||||||
|
.TP
|
||||||
|
.B SIGHUP - 1
|
||||||
|
Restart the dwm process.
|
||||||
|
.TP
|
||||||
|
.B SIGTERM - 15
|
||||||
|
Cleanly terminate the dwm process.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR dmenu (1),
|
.BR dmenu (1),
|
||||||
.BR st (1)
|
.BR st (1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue