From 2d37c0f00a9ecd33bb0830ffa78f5cc0398ac276 Mon Sep 17 00:00:00 2001 From: LM-LCL Date: Thu, 16 Jan 2025 22:19:37 +0100 Subject: Select mouse prtsc support --- config.def.h | 35 +++++++++++++++++++---------------- config.h | 35 +++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/config.def.h b/config.def.h index 8237f9b..82b55ed 100644 --- a/config.def.h +++ b/config.def.h @@ -78,10 +78,11 @@ static const Layout layouts[] = { /* commands */ 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_white, "-sb", col_gray2, "-sf", col_white, NULL }; -static const char *termcmd[] = { "st", NULL }; +static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_white, "-sb", col_gray2, "-sf", col_white, NULL }; +static const char *termcmd[] = { "st", NULL }; static const char *dmenutab[] = { "alt-tab" }; static const char *prtsccmd[] = { "prtsc" }; +static const char *prtscfcmd[] = { "prtscf" }; #include "movestack.c" static const Key keys[] = { @@ -128,19 +129,21 @@ static const Key keys[] = { /* button definitions */ /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static const Button buttons[] = { - /* click event mask button function argument */ - { ClkRootWin, 0, Button2, spawn, {.v = prtsccmd} }, - { ClkClientWin, 0, Button2, spawn, {.v = prtsccmd} }, - { ClkLtSymbol, 0, Button1, setlayout, {0} }, - { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, - { 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} }, + /* click event mask button function argument */ + { ClkRootWin, 0, Button2, spawn, {.v = prtsccmd} }, + { ClkClientWin, 0, Button2, spawn, {.v = prtsccmd} }, + { ClkRootWin, MODKEY|ShiftMask, Button2, spawn, {.v = prtscfcmd} }, + { ClkClientWin, MODKEY|ShiftMask, Button2, spawn, {.v = prtscfcmd} }, + { ClkLtSymbol, 0, Button1, setlayout, {0} }, + { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, + { 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} }, }; diff --git a/config.h b/config.h index 8237f9b..82b55ed 100644 --- a/config.h +++ b/config.h @@ -78,10 +78,11 @@ static const Layout layouts[] = { /* commands */ 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_white, "-sb", col_gray2, "-sf", col_white, NULL }; -static const char *termcmd[] = { "st", NULL }; +static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_white, "-sb", col_gray2, "-sf", col_white, NULL }; +static const char *termcmd[] = { "st", NULL }; static const char *dmenutab[] = { "alt-tab" }; static const char *prtsccmd[] = { "prtsc" }; +static const char *prtscfcmd[] = { "prtscf" }; #include "movestack.c" static const Key keys[] = { @@ -128,19 +129,21 @@ static const Key keys[] = { /* button definitions */ /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static const Button buttons[] = { - /* click event mask button function argument */ - { ClkRootWin, 0, Button2, spawn, {.v = prtsccmd} }, - { ClkClientWin, 0, Button2, spawn, {.v = prtsccmd} }, - { ClkLtSymbol, 0, Button1, setlayout, {0} }, - { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, - { 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} }, + /* click event mask button function argument */ + { ClkRootWin, 0, Button2, spawn, {.v = prtsccmd} }, + { ClkClientWin, 0, Button2, spawn, {.v = prtsccmd} }, + { ClkRootWin, MODKEY|ShiftMask, Button2, spawn, {.v = prtscfcmd} }, + { ClkClientWin, MODKEY|ShiftMask, Button2, spawn, {.v = prtscfcmd} }, + { ClkLtSymbol, 0, Button1, setlayout, {0} }, + { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, + { 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} }, }; -- cgit v1.2.3