Compare commits
No commits in common. "439d2a96c27935533d6e7a6f8eed8bbcb4e70144" and "264d8f9d821cd49135617a412549b23c0ac3abea" have entirely different histories.
439d2a96c2
...
264d8f9d82
155
config.def.h
155
config.def.h
|
@ -34,7 +34,7 @@ static char *colors[][3] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "", "", "", "", "5", "6", "", "", "" };
|
static const char *tags[] = { "", "", "3", "", "5", "6", "7", "8", "" };
|
||||||
|
|
||||||
/* launcher commands (They must be NULL terminated) */
|
/* launcher commands (They must be NULL terminated) */
|
||||||
static const char* grabc[] = { "grabc", "|", "tr", "-d", "'\n'", "|", "xclip", "-selection", "clipboard", NULL };
|
static const char* grabc[] = { "grabc", "|", "tr", "-d", "'\n'", "|", "xclip", "-selection", "clipboard", NULL };
|
||||||
|
@ -53,30 +53,11 @@ static const Rule rules[] = {
|
||||||
* WM_CLASS(STRING) = instance, class
|
* WM_CLASS(STRING) = instance, class
|
||||||
* WM_NAME(STRING) = title
|
* WM_NAME(STRING) = title
|
||||||
*/
|
*/
|
||||||
/* class instance title tags mask isfloating monitor */
|
/* class instance title tags mask isfloating monitor */
|
||||||
// ----- 1 -----
|
{ "Gimp", NULL, NULL, 0, 1, -1 },
|
||||||
{ "st-256color", NULL, NULL, 0, 0, -1 },
|
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
|
||||||
// ----- 2 -----
|
{ "xwinwrap", NULL, NULL, 1 << 9, 0, -1 },
|
||||||
{ "Code", NULL, NULL, 1 << 1, 0, -1 },
|
{ NULL, NULL, "broken", 1 << 9, 0, -1 },
|
||||||
// ----- 3 -----
|
|
||||||
{ "thunderbird", NULL, NULL, 1 << 2, 0, -1 },
|
|
||||||
{ "KeePassXC", NULL, NULL, 1 << 2, 0, -1 },
|
|
||||||
// ----- 4 -----
|
|
||||||
{ "TelegramDesktop", NULL, NULL, 1 << 3, 0, -1 },
|
|
||||||
{ "discord", NULL, NULL, 1 << 3, 0, -1 },
|
|
||||||
// ----- 5 -----
|
|
||||||
{ "Steam", NULL, NULL, 1 << 4, 0, -1 },
|
|
||||||
{ "steamwebhelper", NULL, NULL, 1 << 4, 0, -1 },
|
|
||||||
// ----- 7 -----
|
|
||||||
{ "QjackCtl", NULL, NULL, 1 << 6, 1, -1 },
|
|
||||||
{ "PatchMatrix", NULL, NULL, 1 << 6, 0, -1 },
|
|
||||||
{ "Blueman-manager", NULL, NULL, 1 << 6, 0, -1 },
|
|
||||||
{ "corectrl", NULL, NULL, 1 << 6, 0, -1 },
|
|
||||||
// ----- 9 -----
|
|
||||||
{ "firefox", NULL, NULL, 1 << 8, 0, -1 },
|
|
||||||
// ----- OTHER -----
|
|
||||||
{ "xwinwrap", NULL, NULL, 1 << 9, 0, -1 },
|
|
||||||
{ NULL, NULL, "broken", 1 << 9, 0, -1 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* layout(s) */
|
/* layout(s) */
|
||||||
|
@ -117,78 +98,76 @@ static const char *voldown[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
|
||||||
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
||||||
|
|
||||||
static const char *backlightup[] = { "s", "set-sink-mute", "0", "toggle", NULL };
|
static const char *backlightup[] = { "s", "set-sink-mute", "0", "toggle", NULL };
|
||||||
static const char *lockcmd[] = { "slock", NULL };
|
|
||||||
|
|
||||||
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
|
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
|
||||||
static const char *termcmd[] = { "st", NULL };
|
static const char *termcmd[] = { "st", NULL };
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ 0, XF86XK_ModeLock, spawn, {.v = lockcmd } },
|
{ 0, XK_Print, spawn, {.v = screenshot } },
|
||||||
{ 0, XK_Print, spawn, {.v = screenshot } },
|
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
|
||||||
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
|
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
|
||||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
|
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
|
||||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
|
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
|
||||||
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
|
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
|
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },
|
{ SUPERKEY, XK_b, togglebar, {.i = 1} },
|
||||||
{ SUPERKEY, XK_b, togglebar, {.i = 1} },
|
{ SUPERKEY|ShiftMask, XK_b, togglebar, {.i = 2} },
|
||||||
{ SUPERKEY|ShiftMask, XK_b, togglebar, {.i = 2} },
|
{ ALTKEY, XK_Tab, focusstack, {.i = +1 } },
|
||||||
{ ALTKEY, XK_Tab, focusstack, {.i = +1 } },
|
/* { SUPERKEY, XK_k, focusstack, {.i = -1 } }, */
|
||||||
/* { SUPERKEY, XK_k, focusstack, {.i = -1 } }, */
|
{ SUPERKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ SUPERKEY, XK_i, incnmaster, {.i = +1 } },
|
{ SUPERKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ SUPERKEY, XK_d, incnmaster, {.i = -1 } },
|
{ SUPERKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
{ SUPERKEY, XK_h, setmfact, {.f = -0.05} },
|
{ SUPERKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
{ SUPERKEY, XK_l, setmfact, {.f = +0.05} },
|
{ SUPERKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_Return, zoom, {0} },
|
{ SUPERKEY, XK_Tab, view, {.ui = 0 } }, // next tab
|
||||||
{ SUPERKEY, XK_Tab, view, {.ui = 0 } }, // next tab
|
{ SUPERKEY|ShiftMask, XK_Tab, view, {.ui = -1 } }, // prev tab
|
||||||
{ SUPERKEY|ShiftMask, XK_Tab, view, {.ui = -1 } }, // prev tab
|
{ SUPERKEY|ControlMask, XK_Tab, view, {.ui = -2 } }, // last tab
|
||||||
{ SUPERKEY|ControlMask, XK_Tab, view, {.ui = -2 } }, // last tab
|
{ SUPERKEY, XK_q, killclient, {0} },
|
||||||
{ SUPERKEY, XK_q, killclient, {0} },
|
{ SUPERKEY, XK_t, setlayout, {.v = &layouts[1]} },
|
||||||
{ SUPERKEY, XK_t, setlayout, {.v = &layouts[1]} },
|
{ SUPERKEY, XK_f, setlayout, {.v = &layouts[2]} },
|
||||||
{ SUPERKEY, XK_f, setlayout, {.v = &layouts[2]} },
|
{ SUPERKEY, XK_m, setlayout, {.v = &layouts[3]} },
|
||||||
{ SUPERKEY, XK_m, setlayout, {.v = &layouts[3]} },
|
{ SUPERKEY|ShiftMask, XK_g, setlayout, {.v = &layouts[4]} },
|
||||||
{ SUPERKEY|ShiftMask, XK_g, setlayout, {.v = &layouts[4]} },
|
{ SUPERKEY, XK_g, setlayout, {.v = &layouts[0]} },
|
||||||
{ SUPERKEY, XK_g, setlayout, {.v = &layouts[0]} },
|
/* { SUPERKEY, XK_space, setlayout, {0} }, */
|
||||||
/* { SUPERKEY, XK_space, setlayout, {0} }, */
|
{ SUPERKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_space, togglefloating, {0} },
|
{ SUPERKEY, XK_0, view, {.ui = ~0 } },
|
||||||
{ SUPERKEY, XK_0, view, {.ui = ~0 } },
|
{ SUPERKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
{ SUPERKEY, XK_comma, focusmon, {.i = -1 } },
|
||||||
{ SUPERKEY, XK_comma, focusmon, {.i = -1 } },
|
{ SUPERKEY, XK_period, focusmon, {.i = +1 } },
|
||||||
{ SUPERKEY, XK_period, focusmon, {.i = +1 } },
|
{ SUPERKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
{ SUPERKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ SUPERKEY, XK_minus, setgaps, {.i = -1 } },
|
||||||
{ SUPERKEY, XK_minus, setgaps, {.i = -1 } },
|
{ SUPERKEY, XK_equal, setgaps, {.i = +1 } },
|
||||||
{ SUPERKEY, XK_equal, setgaps, {.i = +1 } },
|
{ SUPERKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
|
{ SUPERKEY|ShiftMask, XK_t, togglealwaysontop, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_t, togglealwaysontop, {0} },
|
{ SUPERKEY|ShiftMask, XK_f, togglefullscr, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_f, togglefullscr, {0} },
|
{ SUPERKEY, XK_F5, xrdb, {.v = NULL } },
|
||||||
{ SUPERKEY, XK_F5, xrdb, {.v = NULL } },
|
TAGKEYS( XK_1, 0)
|
||||||
TAGKEYS( XK_1, 0)
|
TAGKEYS( XK_2, 1)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_3, 2)
|
||||||
TAGKEYS( XK_3, 2)
|
TAGKEYS( XK_4, 3)
|
||||||
TAGKEYS( XK_4, 3)
|
TAGKEYS( XK_5, 4)
|
||||||
TAGKEYS( XK_5, 4)
|
TAGKEYS( XK_6, 5)
|
||||||
TAGKEYS( XK_6, 5)
|
TAGKEYS( XK_7, 6)
|
||||||
TAGKEYS( XK_7, 6)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_9, 8)
|
||||||
TAGKEYS( XK_9, 8)
|
{ SUPERKEY|ShiftMask, XK_q, quitprompt, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_q, quitprompt, {0} },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||||
static const Button buttons[] = {
|
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]} },
|
||||||
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||||
{ ClkClientWin, ALTKEY, Button1, movemouse, {0} },
|
{ ClkClientWin, SUPERKEY, Button1, movemouse, {0} },
|
||||||
{ ClkClientWin, ALTKEY, Button2, togglefloating, {0} },
|
{ ClkClientWin, SUPERKEY, Button2, togglefloating, {0} },
|
||||||
{ ClkClientWin, ALTKEY, Button3, resizemouse, {0} },
|
{ ClkClientWin, SUPERKEY, Button3, resizemouse, {0} },
|
||||||
{ ClkTagBar, 0, Button1, view, {0} },
|
{ ClkTagBar, 0, Button1, view, {0} },
|
||||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||||
{ ClkTagBar, SUPERKEY, Button1, tag, {0} },
|
{ ClkTagBar, SUPERKEY, Button1, tag, {0} },
|
||||||
{ ClkTagBar, SUPERKEY, Button3, toggletag, {0} },
|
{ ClkTagBar, SUPERKEY, Button3, toggletag, {0} },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
163
config.h
163
config.h
|
@ -34,7 +34,7 @@ static char *colors[][3] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "", "", "", "", "5", "6", "", "", "" };
|
static const char *tags[] = { "", "", "3", "", "5", "6", "7", "8", "" };
|
||||||
|
|
||||||
/* launcher commands (They must be NULL terminated) */
|
/* launcher commands (They must be NULL terminated) */
|
||||||
static const char* grabc[] = { "grabc", "|", "tr", "-d", "'\n'", "|", "xclip", "-selection", "clipboard", NULL };
|
static const char* grabc[] = { "grabc", "|", "tr", "-d", "'\n'", "|", "xclip", "-selection", "clipboard", NULL };
|
||||||
|
@ -53,30 +53,11 @@ static const Rule rules[] = {
|
||||||
* WM_CLASS(STRING) = instance, class
|
* WM_CLASS(STRING) = instance, class
|
||||||
* WM_NAME(STRING) = title
|
* WM_NAME(STRING) = title
|
||||||
*/
|
*/
|
||||||
/* class instance title tags mask isfloating monitor */
|
/* class instance title tags mask isfloating monitor */
|
||||||
// ----- 1 -----
|
{ "Gimp", NULL, NULL, 0, 1, -1 },
|
||||||
{ "st-256color", NULL, NULL, 0, 0, -1 },
|
{ "Firefox", NULL, NULL, 1 << 8, 0, -1 },
|
||||||
// ----- 2 -----
|
{ "xwinwrap", NULL, NULL, 1 << 9, 0, -1 },
|
||||||
{ "Code", NULL, NULL, 1 << 1, 0, -1 },
|
{ NULL, NULL, "broken", 1 << 9, 0, -1 },
|
||||||
// ----- 3 -----
|
|
||||||
{ "thunderbird", NULL, NULL, 1 << 2, 0, -1 },
|
|
||||||
{ "KeePassXC", NULL, NULL, 1 << 2, 0, -1 },
|
|
||||||
// ----- 4 -----
|
|
||||||
{ "TelegramDesktop", NULL, NULL, 1 << 3, 0, -1 },
|
|
||||||
{ "discord", NULL, NULL, 1 << 3, 0, -1 },
|
|
||||||
// ----- 5 -----
|
|
||||||
{ "Steam", NULL, NULL, 1 << 4, 0, -1 },
|
|
||||||
{ "steamwebhelper", NULL, NULL, 1 << 4, 0, -1 },
|
|
||||||
// ----- 7 -----
|
|
||||||
{ "QjackCtl", NULL, NULL, 1 << 6, 1, -1 },
|
|
||||||
{ "PatchMatrix", NULL, NULL, 1 << 6, 0, -1 },
|
|
||||||
{ "Blueman-manager", NULL, NULL, 1 << 6, 0, -1 },
|
|
||||||
{ "corectrl", NULL, NULL, 1 << 6, 0, -1 },
|
|
||||||
// ----- 9 -----
|
|
||||||
{ "firefox", NULL, NULL, 1 << 8, 0, -1 },
|
|
||||||
// ----- OTHER -----
|
|
||||||
{ "xwinwrap", NULL, NULL, 1 << 9, 0, -1 },
|
|
||||||
{ NULL, NULL, "broken", 1 << 9, 0, -1 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* layout(s) */
|
/* layout(s) */
|
||||||
|
@ -109,6 +90,8 @@ static const Layout layouts[] = {
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
/* commands */
|
/* commands */
|
||||||
|
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||||
|
|
||||||
static const char *screenshot[] = { "scrsht", NULL };
|
static const char *screenshot[] = { "scrsht", NULL };
|
||||||
static const char *screenshotarea[] = { "scrsht", "-s", NULL };
|
static const char *screenshotarea[] = { "scrsht", "-s", NULL };
|
||||||
|
|
||||||
|
@ -117,78 +100,76 @@ static const char *voldown[] = { "pactl", "set-sink-volume", "0", "-5%", NULL };
|
||||||
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
static const char *volmute[] = { "pactl", "set-sink-mute", "0", "toggle", NULL };
|
||||||
|
|
||||||
static const char *backlightup[] = { "s", "set-sink-mute", "0", "toggle", NULL };
|
static const char *backlightup[] = { "s", "set-sink-mute", "0", "toggle", NULL };
|
||||||
static const char *lockcmd[] = { "slock", NULL };
|
|
||||||
|
|
||||||
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
|
static const char *dmenucmd[] = { "dmenu_run", "-g", "15", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, 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 */
|
||||||
{ 0, XF86XK_ModeLock, spawn, {.v = lockcmd } },
|
{ 0, XK_Print, spawn, {.v = screenshot } },
|
||||||
{ 0, XK_Print, spawn, {.v = screenshot } },
|
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
|
||||||
{ ShiftMask, XK_Print, spawn, {.v = screenshotarea } },
|
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
|
||||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volup } },
|
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
|
||||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldown } },
|
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
|
||||||
{ 0, XF86XK_AudioMute, spawn, {.v = volmute } },
|
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
{ SUPERKEY, XK_p, spawn, {.v = dmenucmd } },
|
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ SUPERKEY, XK_Return, spawn, {.v = termcmd } },
|
{ SUPERKEY, XK_b, togglebar, {.i = 1} },
|
||||||
{ SUPERKEY, XK_b, togglebar, {.i = 1} },
|
{ SUPERKEY|ShiftMask, XK_b, togglebar, {.i = 2} },
|
||||||
{ SUPERKEY|ShiftMask, XK_b, togglebar, {.i = 2} },
|
{ ALTKEY, XK_Tab, focusstack, {.i = +1 } },
|
||||||
{ ALTKEY, XK_Tab, focusstack, {.i = +1 } },
|
/* { SUPERKEY, XK_k, focusstack, {.i = -1 } }, */
|
||||||
/* { SUPERKEY, XK_k, focusstack, {.i = -1 } }, */
|
{ SUPERKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ SUPERKEY, XK_i, incnmaster, {.i = +1 } },
|
{ SUPERKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ SUPERKEY, XK_d, incnmaster, {.i = -1 } },
|
{ SUPERKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
{ SUPERKEY, XK_h, setmfact, {.f = -0.05} },
|
{ SUPERKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
{ SUPERKEY, XK_l, setmfact, {.f = +0.05} },
|
{ SUPERKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_Return, zoom, {0} },
|
{ SUPERKEY, XK_Tab, view, {.ui = 0 } }, // next tab
|
||||||
{ SUPERKEY, XK_Tab, view, {.ui = 0 } }, // next tab
|
{ SUPERKEY|ShiftMask, XK_Tab, view, {.ui = -1 } }, // prev tab
|
||||||
{ SUPERKEY|ShiftMask, XK_Tab, view, {.ui = -1 } }, // prev tab
|
{ SUPERKEY|ControlMask, XK_Tab, view, {.ui = -2 } }, // last tab
|
||||||
{ SUPERKEY|ControlMask, XK_Tab, view, {.ui = -2 } }, // last tab
|
{ SUPERKEY, XK_q, killclient, {0} },
|
||||||
{ SUPERKEY, XK_q, killclient, {0} },
|
{ SUPERKEY, XK_t, setlayout, {.v = &layouts[1]} },
|
||||||
{ SUPERKEY, XK_t, setlayout, {.v = &layouts[1]} },
|
{ SUPERKEY, XK_f, setlayout, {.v = &layouts[2]} },
|
||||||
{ SUPERKEY, XK_f, setlayout, {.v = &layouts[2]} },
|
{ SUPERKEY, XK_m, setlayout, {.v = &layouts[3]} },
|
||||||
{ SUPERKEY, XK_m, setlayout, {.v = &layouts[3]} },
|
{ SUPERKEY|ShiftMask, XK_g, setlayout, {.v = &layouts[4]} },
|
||||||
{ SUPERKEY|ShiftMask, XK_g, setlayout, {.v = &layouts[4]} },
|
{ SUPERKEY, XK_g, setlayout, {.v = &layouts[0]} },
|
||||||
{ SUPERKEY, XK_g, setlayout, {.v = &layouts[0]} },
|
/* { SUPERKEY, XK_space, setlayout, {0} }, */
|
||||||
/* { SUPERKEY, XK_space, setlayout, {0} }, */
|
{ SUPERKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_space, togglefloating, {0} },
|
{ SUPERKEY, XK_0, view, {.ui = ~0 } },
|
||||||
{ SUPERKEY, XK_0, view, {.ui = ~0 } },
|
{ SUPERKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
{ SUPERKEY, XK_comma, focusmon, {.i = -1 } },
|
||||||
{ SUPERKEY, XK_comma, focusmon, {.i = -1 } },
|
{ SUPERKEY, XK_period, focusmon, {.i = +1 } },
|
||||||
{ SUPERKEY, XK_period, focusmon, {.i = +1 } },
|
{ SUPERKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
{ SUPERKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ SUPERKEY, XK_minus, setgaps, {.i = -1 } },
|
||||||
{ SUPERKEY, XK_minus, setgaps, {.i = -1 } },
|
{ SUPERKEY, XK_equal, setgaps, {.i = +1 } },
|
||||||
{ SUPERKEY, XK_equal, setgaps, {.i = +1 } },
|
{ SUPERKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
|
||||||
{ SUPERKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } },
|
{ SUPERKEY|ShiftMask, XK_t, togglealwaysontop, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_t, togglealwaysontop, {0} },
|
{ SUPERKEY|ShiftMask, XK_f, togglefullscr, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_f, togglefullscr, {0} },
|
{ SUPERKEY, XK_F5, xrdb, {.v = NULL } },
|
||||||
{ SUPERKEY, XK_F5, xrdb, {.v = NULL } },
|
TAGKEYS( XK_1, 0)
|
||||||
TAGKEYS( XK_1, 0)
|
TAGKEYS( XK_2, 1)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_3, 2)
|
||||||
TAGKEYS( XK_3, 2)
|
TAGKEYS( XK_4, 3)
|
||||||
TAGKEYS( XK_4, 3)
|
TAGKEYS( XK_5, 4)
|
||||||
TAGKEYS( XK_5, 4)
|
TAGKEYS( XK_6, 5)
|
||||||
TAGKEYS( XK_6, 5)
|
TAGKEYS( XK_7, 6)
|
||||||
TAGKEYS( XK_7, 6)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_9, 8)
|
||||||
TAGKEYS( XK_9, 8)
|
{ SUPERKEY|ShiftMask, XK_q, quitprompt, {0} },
|
||||||
{ SUPERKEY|ShiftMask, XK_q, quitprompt, {0} },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||||
static const Button buttons[] = {
|
static 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]} },
|
||||||
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||||
{ ClkClientWin, ALTKEY, Button1, movemouse, {0} },
|
{ ClkClientWin, SUPERKEY, Button1, movemouse, {0} },
|
||||||
{ ClkClientWin, ALTKEY, Button2, togglefloating, {0} },
|
{ ClkClientWin, SUPERKEY, Button2, togglefloating, {0} },
|
||||||
{ ClkClientWin, ALTKEY, Button3, resizemouse, {0} },
|
{ ClkClientWin, SUPERKEY, Button3, resizemouse, {0} },
|
||||||
{ ClkTagBar, 0, Button1, view, {0} },
|
{ ClkTagBar, 0, Button1, view, {0} },
|
||||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||||
{ ClkTagBar, SUPERKEY, Button1, tag, {0} },
|
{ ClkTagBar, SUPERKEY, Button1, tag, {0} },
|
||||||
{ ClkTagBar, SUPERKEY, Button3, toggletag, {0} },
|
{ ClkTagBar, SUPERKEY, Button3, toggletag, {0} },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
44
dwm.c
44
dwm.c
|
@ -482,7 +482,7 @@ buttonpress(XEvent *e)
|
||||||
goto execute_handler;
|
goto execute_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
x += TEXTW(selmon->ltsymbol);
|
x += blw;
|
||||||
|
|
||||||
for(i = 0; i < LENGTH(launchers); i++) {
|
for(i = 0; i < LENGTH(launchers); i++) {
|
||||||
x += TEXTW(launchers[i].name);
|
x += TEXTW(launchers[i].name);
|
||||||
|
@ -837,8 +837,8 @@ drawstatusbar(Monitor *m, int bh, int extra, char* stext) {
|
||||||
|
|
||||||
if (extra) {
|
if (extra) {
|
||||||
w = m->ww;
|
w = m->ww;
|
||||||
w = m->ww - w - 2 * hpb;
|
// w = m->ww - w - 2 * hpb;
|
||||||
ret = m->ww - w;
|
ret = 1;
|
||||||
x = 0 - 1;
|
x = 0 - 1;
|
||||||
x2 = m->ww - w2 - 2 * hpb;
|
x2 = m->ww - w2 - 2 * hpb;
|
||||||
} else {
|
} else {
|
||||||
|
@ -980,6 +980,8 @@ void
|
||||||
drawbar(Monitor *m)
|
drawbar(Monitor *m)
|
||||||
{
|
{
|
||||||
int x, w, tw = 0;
|
int x, w, tw = 0;
|
||||||
|
int boxs = drw->fonts->h / 9;
|
||||||
|
int boxw = drw->fonts->h / 6 + 2;
|
||||||
unsigned int i, occ = 0, urg = 0;
|
unsigned int i, occ = 0, urg = 0;
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
|
@ -1032,8 +1034,8 @@ drawbar(Monitor *m)
|
||||||
|
|
||||||
if (m->showextrabar) {
|
if (m->showextrabar) {
|
||||||
if (m == selmon) { /* extra status is only drawn on selected monitor */
|
if (m == selmon) { /* extra status is only drawn on selected monitor */
|
||||||
sw = drawstatusbar(m, bh, 1, estext);
|
sw = drawstatusbar(m, bh, 1, estext);
|
||||||
drw_map(drw, m->extrabarwin, 0, 0, m->ww, bh);
|
drw_map(drw, m->extrabarwin, 0, 0, m->ww, bh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1635,14 +1637,9 @@ void
|
||||||
resizemouse(const Arg *arg)
|
resizemouse(const Arg *arg)
|
||||||
{
|
{
|
||||||
int ocx, ocy, nw, nh;
|
int ocx, ocy, nw, nh;
|
||||||
int ocx2, ocy2, nx, ny;
|
|
||||||
Client *c;
|
Client *c;
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
int horizcorner, vertcorner;
|
|
||||||
int di;
|
|
||||||
unsigned int dui;
|
|
||||||
Window dummy;
|
|
||||||
Time lasttime = 0;
|
Time lasttime = 0;
|
||||||
|
|
||||||
if (!(c = selmon->sel))
|
if (!(c = selmon->sel))
|
||||||
|
@ -1652,19 +1649,10 @@ resizemouse(const Arg *arg)
|
||||||
restack(selmon);
|
restack(selmon);
|
||||||
ocx = c->x;
|
ocx = c->x;
|
||||||
ocy = c->y;
|
ocy = c->y;
|
||||||
ocx2 = c->x + c->w;
|
|
||||||
ocy2 = c->y + c->h;
|
|
||||||
if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||||
None, cursor[CurResize]->cursor, CurrentTime) != GrabSuccess)
|
None, cursor[CurResize]->cursor, CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
// XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
||||||
if (!XQueryPointer (dpy, c->win, &dummy, &dummy, &di, &di, &nx, &ny, &dui))
|
|
||||||
return;
|
|
||||||
horizcorner = nx < c->w / 2;
|
|
||||||
vertcorner = ny < c->h / 2;
|
|
||||||
XWarpPointer (dpy, None, c->win, 0, 0, 0, 0,
|
|
||||||
horizcorner ? (-c->bw) : (c->w + c->bw -1),
|
|
||||||
vertcorner ? (-c->bw) : (c->h + c->bw -1));
|
|
||||||
do {
|
do {
|
||||||
XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
|
XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
|
||||||
switch(ev.type) {
|
switch(ev.type) {
|
||||||
|
@ -1678,12 +1666,8 @@ resizemouse(const Arg *arg)
|
||||||
continue;
|
continue;
|
||||||
lasttime = ev.xmotion.time;
|
lasttime = ev.xmotion.time;
|
||||||
|
|
||||||
// nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
|
nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
|
||||||
// nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
|
nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
|
||||||
nx = horizcorner ? ev.xmotion.x : c->x;
|
|
||||||
ny = vertcorner ? ev.xmotion.y : c->y;
|
|
||||||
nw = MAX(horizcorner ? (ocx2 - nx) : (ev.xmotion.x - ocx - 2 * c->bw + 1), 1);
|
|
||||||
nh = MAX(vertcorner ? (ocy2 - ny) : (ev.xmotion.y - ocy - 2 * c->bw + 1), 1);
|
|
||||||
|
|
||||||
if (c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww
|
if (c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww
|
||||||
&& c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh)
|
&& c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh)
|
||||||
|
@ -1693,15 +1677,11 @@ resizemouse(const Arg *arg)
|
||||||
togglefloating(NULL);
|
togglefloating(NULL);
|
||||||
}
|
}
|
||||||
if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
|
if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
|
||||||
// resize(c, c->x, c->y, nw, nh, 1);
|
resize(c, c->x, c->y, nw, nh, 1);
|
||||||
resize(c, nx, ny, nw, nh, 1);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (ev.type != ButtonRelease);
|
} while (ev.type != ButtonRelease);
|
||||||
// XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
||||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0,
|
|
||||||
horizcorner ? (-c->bw) : (c->w + c->bw - 1),
|
|
||||||
vertcorner ? (-c->bw) : (c->h + c->bw - 1));
|
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
||||||
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
|
||||||
|
|
Loading…
Reference in New Issue