Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
746000354e | ||
|
|
6ba7d159cd | ||
|
|
3b36d4a7ec | ||
|
|
fea3e97cd2 | ||
|
|
87d19b01e4 | ||
|
|
db82e9b3bf | ||
|
|
7f33cd61a0 | ||
|
|
3c39f7f0f7 | ||
|
|
a60a6ad86f | ||
|
|
b09c018c02 | ||
|
|
1a18d7ca48 | ||
|
|
dbaf66abb3 | ||
|
|
e401821c15 | ||
|
|
3a8b2220db | ||
|
|
14e59f1f91 | ||
|
|
0b15b3a2bf | ||
|
|
22b54433b8 | ||
|
|
44dbc6809d | ||
|
|
2bb919e634 | ||
|
|
c3dd6a829b | ||
|
|
5c9f30300b | ||
|
|
397d618f1c | ||
|
|
f63cde9354 |
No files matched your search
+36
-25
@@ -2,8 +2,8 @@
|
|||||||
#include "gaplessgrid.c"
|
#include "gaplessgrid.c"
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||||
static const unsigned int gappx = 6; /* gaps between windows */
|
static const unsigned int gappx = 2; /* gaps between 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 = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
@@ -14,16 +14,18 @@ static const char col_gray2[] = "#444444";
|
|||||||
static const char col_gray3[] = "#bbbbbb";
|
static const char col_gray3[] = "#bbbbbb";
|
||||||
static const char col_gray4[] = "#eeeeee";
|
static const char col_gray4[] = "#eeeeee";
|
||||||
static const char col_cyan[] = "#005577";
|
static const char col_cyan[] = "#005577";
|
||||||
|
static const char col_border_focus_light[] = "#df8c20"; // hsl(34 75% 50%)
|
||||||
|
static const char col_border_focus_dark[] = "#b25e34"; // hsl(20 55% 45%)
|
||||||
static const char *colorsdark[][3] = {
|
static const char *colorsdark[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
|
[SchemeSel] = { col_gray4, col_cyan, col_border_focus_dark },
|
||||||
[SchemeHid] = { col_cyan, col_gray1, col_cyan },
|
[SchemeHid] = { col_cyan, col_gray1, col_cyan },
|
||||||
};
|
};
|
||||||
static const char *colorslight[][3] = {
|
static const char *colorslight[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray1, col_gray3, col_gray2 },
|
[SchemeNorm] = { col_gray1, col_gray3, col_gray2 },
|
||||||
[SchemeSel] = { col_cyan, col_gray4, col_cyan },
|
[SchemeSel] = { col_cyan, col_gray4, col_border_focus_light },
|
||||||
[SchemeHid] = { col_cyan, col_gray1, col_cyan },
|
[SchemeHid] = { col_cyan, col_gray1, col_cyan },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -56,7 +58,7 @@ static const Layout layouts[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* 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} }, \
|
||||||
@@ -68,26 +70,30 @@ static const Layout layouts[] = {
|
|||||||
|
|
||||||
/* commands */
|
/* commands */
|
||||||
static char dmenumon[2] = "0"; /* component of dmenu{dark,light}, manipulated in spawndmenu() */
|
static char dmenumon[2] = "0"; /* component of dmenu{dark,light}, manipulated in spawndmenu() */
|
||||||
static const char *dmenudark[] = { "dmenu_run", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
static const char *dmenudark[] = { "dmenu_run", "-l", "10", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||||
static const char *dmenulight[] = { "dmenu_run", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray3, "-nf", col_gray1, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
static const char *dmenulight[] = { "dmenu_run", "-l", "10", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray3, "-nf", col_gray1, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||||
static const char *termcmd[] = { "st", NULL };
|
static const char *termcmd[] = { "st", NULL };
|
||||||
#include "shift-tools.c"
|
static const char *lockcmd[] = { "slock", NULL };
|
||||||
|
static const char *suspendcmd[] = { "systemctl", "suspend", NULL };
|
||||||
|
static const char *themecmd[] = { "lupan-set-theme", "toggle", NULL };
|
||||||
|
|
||||||
|
#include "shift-tools.c"
|
||||||
#include "exitdwm.c"
|
#include "exitdwm.c"
|
||||||
#include "movestack.c"
|
#include "movestack.c"
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY, XK_p, spawndmenu, {0} },
|
{ MODKEY, XK_p, spawndmenu, {0} },
|
||||||
{ MODKEY, XK_o, shiftviewclients, { .i = +1 } },
|
{ MODKEY, XK_u, shiftview, { .i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_o, shiftview, { .i = +1 } },
|
{ MODKEY|ShiftMask, XK_u, shifttag, { .i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_i, shiftview, { .i = -1 } },
|
{ MODKEY|ShiftMask, XK_y, shifttag, { .i = -1 } },
|
||||||
{ MODKEY, XK_i, shiftviewclients, { .i = -1 } },
|
{ MODKEY, XK_y, shiftview, { .i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
{ MODKEY, XK_j, focusstackvis, {.i = +1 } },
|
{ MODKEY, XK_j, focusstackvis, {.i = +1 } },
|
||||||
{ MODKEY, XK_k, focusstackvis, {.i = -1 } },
|
{ MODKEY, XK_k, focusstackvis, {.i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_j, focusstackhid, {.i = +1 } },
|
{ MODKEY|ControlMask, XK_j, focusstackhid, {.i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_k, focusstackhid, {.i = -1 } },
|
{ MODKEY|ControlMask, XK_k, focusstackhid, {.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} },
|
||||||
@@ -100,11 +106,12 @@ static const Key keys[] = {
|
|||||||
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
{ MODKEY, XK_g, goback, {0} },
|
{ MODKEY, XK_w, goback, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_c, killclient, {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_g, setlayout, {.v = &layouts[3]} },
|
||||||
{ MODKEY, XK_space, setlayout, {0} },
|
{ MODKEY, XK_space, setlayout, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||||
@@ -115,7 +122,7 @@ static const Key keys[] = {
|
|||||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
{ MODKEY, XK_s, show, {0} },
|
{ MODKEY, XK_s, show, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_s, showall, {0} },
|
{ MODKEY|ShiftMask, XK_s, showall, {0} },
|
||||||
{ MODKEY, XK_h, hide, {0} },
|
{ MODKEY|ControlMask, XK_s, hide, {0} },
|
||||||
TAGKEYS( XK_1, 0)
|
TAGKEYS( XK_1, 0)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_2, 1)
|
||||||
TAGKEYS( XK_3, 2)
|
TAGKEYS( XK_3, 2)
|
||||||
@@ -125,20 +132,24 @@ 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_j, focusbynum, {.i = 0} },
|
{ ControlMask, XK_1, focusbynum, {.i = 0} },
|
||||||
{ MODKEY|ShiftMask, XK_k, focusbynum, {.i = 1} },
|
{ ControlMask, XK_2, focusbynum, {.i = 1} },
|
||||||
{ MODKEY|ShiftMask, XK_l, focusbynum, {.i = 2} },
|
{ ControlMask, XK_3, focusbynum, {.i = 2} },
|
||||||
{ MODKEY|ShiftMask, XK_colon, focusbynum, {.i = 3} },
|
{ ControlMask, XK_4, focusbynum, {.i = 3} },
|
||||||
{ MODKEY|ShiftMask, XK_f, focusbynum, {.i = 4} },
|
{ ControlMask, XK_5, focusbynum, {.i = 4} },
|
||||||
{ MODKEY|ShiftMask, XK_d, focusbynum, {.i = 5} },
|
{ ControlMask, XK_6, focusbynum, {.i = 5} },
|
||||||
{ MODKEY|ShiftMask, XK_s, focusbynum, {.i = 6} },
|
{ ControlMask, XK_7, focusbynum, {.i = 6} },
|
||||||
{ MODKEY|ShiftMask, XK_a, focusbynum, {.i = 7} },
|
{ ControlMask, XK_8, focusbynum, {.i = 7} },
|
||||||
|
{ ControlMask, XK_9, focusbynum, {.i = 8} },
|
||||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
|
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
|
||||||
{ MODKEY|ShiftMask, XK_e, exitdwm, {0} },
|
{ MODKEY|ShiftMask, XK_e, exitdwm, {0} },
|
||||||
{ MODKEY, XK_o, winview, {0} },
|
{ MODKEY, XK_o, winview, {0} },
|
||||||
{ MODKEY, XK_g, gridall, {} },
|
{ MODKEY, XK_a, gridall, {} },
|
||||||
{ MODKEY, XK_r, winviewmono, {} },
|
{ MODKEY, XK_r, winviewmono, {} },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_t, spawn, {.v = themecmd } },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
|
|||||||
@@ -0,0 +1,174 @@
|
|||||||
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
#include "gaplessgrid.c"
|
||||||
|
|
||||||
|
/* appearance */
|
||||||
|
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||||
|
static const unsigned int gappx = 2; /* gaps between 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=11" };
|
||||||
|
static const char dmenufont[] = "monospace:size=11";
|
||||||
|
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";
|
||||||
|
static const char col_border_focus_light[] = "#df8c20"; // hsl(34 75% 50%)
|
||||||
|
static const char col_border_focus_dark[] = "#b25e34"; // hsl(20 55% 45%)
|
||||||
|
static const char *colorsdark[][3] = {
|
||||||
|
/* fg bg border */
|
||||||
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
|
[SchemeSel] = { col_gray4, col_cyan, col_border_focus_dark },
|
||||||
|
[SchemeHid] = { col_cyan, col_gray1, col_cyan },
|
||||||
|
};
|
||||||
|
static const char *colorslight[][3] = {
|
||||||
|
/* fg bg border */
|
||||||
|
[SchemeNorm] = { col_gray1, col_gray3, col_gray2 },
|
||||||
|
[SchemeSel] = { col_cyan, col_gray4, col_border_focus_light },
|
||||||
|
[SchemeHid] = { col_cyan, col_gray1, col_cyan },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
|
{ "Gimp", NULL, NULL, 0, 1, -1 },
|
||||||
|
{ "Firefox", NULL, NULL, 1 << 8, 0, -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 */
|
||||||
|
static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
|
||||||
|
|
||||||
|
static const Layout layouts[] = {
|
||||||
|
/* symbol arrange function */
|
||||||
|
{ "[]=", tile }, /* first entry is default */
|
||||||
|
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||||
|
{ "[M]", monocle },
|
||||||
|
{ "HHH", gaplessgrid },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 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 dmenu{dark,light}, manipulated in spawndmenu() */
|
||||||
|
static const char *dmenudark[] = { "dmenu_run", "-l", "10", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||||
|
static const char *dmenulight[] = { "dmenu_run", "-l", "10", "-m", dmenumon, "-i", "-fn", dmenufont, "-nb", col_gray3, "-nf", col_gray1, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||||
|
static const char *termcmd[] = { "alacritty", NULL };
|
||||||
|
static const char *lockcmd[] = { "slock", NULL };
|
||||||
|
static const char *suspendcmd[] = { "systemctl", "suspend", NULL };
|
||||||
|
static const char *themecmd[] = { "lupan-set-theme", "toggle", NULL };
|
||||||
|
static const char *changeresulutioncmd[] = { "change-resolution", NULL };
|
||||||
|
|
||||||
|
#include "shift-tools.c"
|
||||||
|
#include "exitdwm.c"
|
||||||
|
#include "movestack.c"
|
||||||
|
|
||||||
|
static const Key keys[] = {
|
||||||
|
/* modifier key function argument */
|
||||||
|
{ MODKEY, XK_p, spawndmenu, {0} },
|
||||||
|
{ MODKEY, XK_u, shiftview, { .i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_u, shifttag, { .i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_y, shifttag, { .i = -1 } },
|
||||||
|
{ MODKEY, XK_y, shiftview, { .i = -1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
|
{ MODKEY, XK_j, focusstackvis, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_k, focusstackvis, {.i = -1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_j, focusstackhid, {.i = +1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_k, focusstackhid, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
|
{ MODKEY|ShiftMask, XK_h, shiftboth, { .i = -1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_h, shiftswaptags, { .i = -1 } },
|
||||||
|
{ MODKEY|ControlMask, XK_l, shiftswaptags, { .i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_l, shiftboth, { .i = +1 } },
|
||||||
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
|
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
|
{ MODKEY, XK_w, goback, {0} },
|
||||||
|
{ MODKEY|ShiftMask, 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_g, setlayout, {.v = &layouts[3]} },
|
||||||
|
{ MODKEY, XK_space, setlayout, {0} },
|
||||||
|
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||||
|
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_s, show, {0} },
|
||||||
|
{ MODKEY|ShiftMask, XK_s, showall, {0} },
|
||||||
|
{ MODKEY|ControlMask, XK_s, hide, {0} },
|
||||||
|
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)
|
||||||
|
{ ControlMask, XK_1, focusbynum, {.i = 0} },
|
||||||
|
{ ControlMask, XK_2, focusbynum, {.i = 1} },
|
||||||
|
{ ControlMask, XK_3, focusbynum, {.i = 2} },
|
||||||
|
{ ControlMask, XK_4, focusbynum, {.i = 3} },
|
||||||
|
{ ControlMask, XK_5, focusbynum, {.i = 4} },
|
||||||
|
{ ControlMask, XK_6, focusbynum, {.i = 5} },
|
||||||
|
{ ControlMask, XK_7, focusbynum, {.i = 6} },
|
||||||
|
{ ControlMask, XK_8, focusbynum, {.i = 7} },
|
||||||
|
{ ControlMask, XK_9, focusbynum, {.i = 8} },
|
||||||
|
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} },
|
||||||
|
{ MODKEY|ShiftMask, XK_e, exitdwm, {0} },
|
||||||
|
{ MODKEY, XK_o, winview, {0} },
|
||||||
|
{ MODKEY, XK_a, gridall, {} },
|
||||||
|
{ MODKEY, XK_r, winviewmono, {} },
|
||||||
|
{ MODKEY, XK_n, spawn, {.v = changeresulutioncmd } },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
||||||
|
{ MODKEY|ControlMask|ShiftMask, XK_t, spawn, {.v = themecmd } },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 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]} },
|
||||||
|
{ ClkWinTitle, 0, Button1, togglewin, {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} },
|
||||||
|
};
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# dwm version
|
# dwm version
|
||||||
VERSION = 6.7
|
VERSION = 6.8
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
|
|||||||
@@ -975,15 +975,15 @@ focusstack(int inc, int hid)
|
|||||||
Atom
|
Atom
|
||||||
getatomprop(Client *c, Atom prop)
|
getatomprop(Client *c, Atom prop)
|
||||||
{
|
{
|
||||||
int di;
|
int format;
|
||||||
unsigned long nitems, dl;
|
unsigned long nitems, dl;
|
||||||
unsigned char *p = NULL;
|
unsigned char *p = NULL;
|
||||||
Atom da, atom = None;
|
Atom da, atom = None;
|
||||||
|
|
||||||
if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
|
if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
|
||||||
&da, &di, &nitems, &dl, &p) == Success && p) {
|
&da, &format, &nitems, &dl, &p) == Success && p) {
|
||||||
if (nitems > 0)
|
if (nitems > 0 && format == 32)
|
||||||
atom = *(Atom *)p;
|
atom = *(long *)p;
|
||||||
XFree(p);
|
XFree(p);
|
||||||
}
|
}
|
||||||
return atom;
|
return atom;
|
||||||
@@ -1009,10 +1009,10 @@ getstate(Window w)
|
|||||||
Atom real;
|
Atom real;
|
||||||
|
|
||||||
if (XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState],
|
if (XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState],
|
||||||
&real, &format, &n, &extra, (unsigned char **)&p) != Success)
|
&real, &format, &n, &extra, &p) != Success)
|
||||||
return -1;
|
return -1;
|
||||||
if (n != 0)
|
if (n != 0 && format == 32)
|
||||||
result = *p;
|
result = *(long *)p;
|
||||||
XFree(p);
|
XFree(p);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -1722,12 +1722,10 @@ sendevent(Client *c, Atom proto)
|
|||||||
void
|
void
|
||||||
setfocus(Client *c)
|
setfocus(Client *c)
|
||||||
{
|
{
|
||||||
if (!c->neverfocus) {
|
if (!c->neverfocus)
|
||||||
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
|
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
|
||||||
XChangeProperty(dpy, root, netatom[NetActiveWindow],
|
XChangeProperty(dpy, root, netatom[NetActiveWindow], XA_WINDOW, 32,
|
||||||
XA_WINDOW, 32, PropModeReplace,
|
PropModeReplace, (unsigned char *)&c->win, 1);
|
||||||
(unsigned char *) &(c->win), 1);
|
|
||||||
}
|
|
||||||
sendevent(c, wmatom[WMTakeFocus]);
|
sendevent(c, wmatom[WMTakeFocus]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user