diff options
| -rw-r--r-- | .gear/dwm.spec | 5 | ||||
| -rw-r--r-- | dwm-6.4_userconfig.patch | 30 |
2 files changed, 23 insertions, 12 deletions
diff --git a/.gear/dwm.spec b/.gear/dwm.spec index d6db6bd..0d3666a 100644 --- a/.gear/dwm.spec +++ b/.gear/dwm.spec @@ -1,6 +1,6 @@ Name: dwm %define dwm_version 6.4 -%define patches_version .1 +%define patches_version .2 Version: %dwm_version%patches_version Release: alt1 @@ -43,6 +43,9 @@ install -pD -m 644 %name.png %buildroot%_niconsdir/%name.png %_niconsdir/%name.png %changelog +* Mon Feb 19 2024 Andrew Guschin <guschin@altlinux.org> 6.4.2-alt1 +- add keybindings for screenshots + * Mon Feb 19 2024 Andrew Guschin <guschin@altlinux.org> 6.4.1-alt1 - change terminal to wezterm diff --git a/dwm-6.4_userconfig.patch b/dwm-6.4_userconfig.patch index c2847d9..09d894c 100644 --- a/dwm-6.4_userconfig.patch +++ b/dwm-6.4_userconfig.patch @@ -1,9 +1,9 @@ diff --git a/config.h b/config.h new file mode 100644 -index 0000000..e074b74 +index 0000000..1fe5c57 --- /dev/null +++ b/config.h -@@ -0,0 +1,187 @@ +@@ -0,0 +1,195 @@ +/* See LICENSE file for copyright and license details. */ + +/* appearance */ @@ -99,6 +99,14 @@ index 0000000..e074b74 +static const char *sound_mute[] = SHCMD("pulsemixer --toggle-mute; pkill -RTMIN+9 dwmblocks"); +static const char *sound_dec[] = SHCMD("pulsemixer --change-volume -5; pkill -RTMIN+9 dwmblocks"); +static const char *sound_inc[] = SHCMD("pulsemixer --change-volume +5; pkill -RTMIN+9 dwmblocks"); ++static const char *screenshot_a2c[] = SHCMD("screenshot area to clip"); ++static const char *screenshot_a2f[] = SHCMD("screenshot area to file"); ++static const char *screenshot_w2c[] = SHCMD("screenshot window to clip"); ++static const char *screenshot_w2f[] = SHCMD("screenshot window to file"); ++static const char *screenshot_s2c[] = SHCMD("screenshot screeb to clip"); ++static const char *screenshot_s2f[] = SHCMD("screenshot screeb to file"); ++static const char *on_touchpad_off[] = SHCMD("notify-send 'Touchpad turned off'"); ++static const char *on_touchpad_on[] = SHCMD("notify-send 'Touchpad turned on'"); + +#include <X11/XF86keysym.h> +#include "movestack.c" @@ -153,17 +161,17 @@ index 0000000..e074b74 + { 1, { {0, XF86XK_AudioMute} }, spawn, { .v = sound_mute } }, + { 1, { {0, XF86XK_AudioLowerVolume} }, spawn, { .v = sound_dec } }, + { 1, { {0, XF86XK_AudioRaiseVolume} }, spawn, { .v = sound_inc } }, -+ // { 0, XF86XK_TouchpadOff, spawn, SHCMD("notify-send 'Touchpad turned off'") }, -+ // { 0, XF86XK_TouchpadOn, spawn, SHCMD("notify-send 'Touchpad turned on'") }, ++ { 1, { {0, XF86XK_TouchpadOff} }, spawn, { .v = on_touchpad_off } }, ++ { 1, { {0, XF86XK_TouchpadOn} }, spawn, { .v = on_touchpad_on } }, + + // Screenshots -+ // { 1, { {0, XK_Print} }, spawn, { .v = SHCMD("notify-send hello") } }, -+ // { 2, { {MODKEY, XK_Print}, {0, XK_a} }, spawn, { .v = SHCMD("screenshot area to clip") } }, -+ // { 2, { {MODKEY, XK_Print}, {0|ShiftMask, XK_a} }, spawn, { .v = SHCMD("screenshot area to file") } }, -+ // { 2, { {MODKEY, XK_Print}, {0, XK_space} }, spawn, { .v = SHCMD("screenshot window to clip") } }, -+ // { 2, { {MODKEY, XK_Print}, {0|ShiftMask, XK_space} }, spawn, { .v = SHCMD("screenshot window to file") } }, -+ // { 2, { {MODKEY, XK_Print}, {0, XK_Return} }, spawn, { .v = SHCMD("screenshot screen to clip") } }, -+ // { 2, { {MODKEY, XK_Print}, {0|ShiftMask, XK_Return} }, spawn, { .v = SHCMD("screenshot screen to file") } }, ++ { 1, { {0, XK_Print} }, spawn, { .v = screenshot_a2c } }, ++ { 2, { {MODKEY, XK_Print}, {0, XK_a} }, spawn, { .v = screenshot_a2c } }, ++ { 2, { {MODKEY, XK_Print}, {0|ShiftMask, XK_a} }, spawn, { .v = screenshot_a2f } }, ++ { 2, { {MODKEY, XK_Print}, {0, XK_space} }, spawn, { .v = screenshot_w2c } }, ++ { 2, { {MODKEY, XK_Print}, {0|ShiftMask, XK_space} }, spawn, { .v = screenshot_w2f } }, ++ { 2, { {MODKEY, XK_Print}, {0, XK_Return} }, spawn, { .v = screenshot_s2c } }, ++ { 2, { {MODKEY, XK_Print}, {0|ShiftMask, XK_Return} }, spawn, { .v = screenshot_s2f } }, + + // actualfullscreen + { 1, { {MODKEY|ShiftMask, XK_f} }, togglefullscr, {0} }, |