From da84737afb7d4f7c47c4b84582db37467949a0f8 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Thu, 3 Sep 2026 16:13:55 -0400 Subject: bind screenshot commands to prtsc --- config.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.h') diff --git a/config.h b/config.h index a60dc7e..f262f1c 100644 --- a/config.h +++ b/config.h @@ -67,6 +67,8 @@ static const char *voldowncmd[] = { "/bin/sh", "-c", "pactl set-sink-mute @DEFAU static const char *volmutecmd[] = { "/bin/sh", "-c", "pactl set-sink-mute @DEFAULT_SINK@ toggle", NULL }; static const char *micmutecmd[] = { "/bin/sh", "-c", "pactl set-source-mute @DEFAULT_SOURCE@ toggle", NULL }; static const char *mixercmd[] = { "st", "-e", "pulsemixer", NULL }; +static const char *shotselexec[] = { "/bin/sh", "-c", "mkdir -p ~/pics/screenshots; f=~/pics/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png; maim -s \"$f\" && xclip -selection clipboard -t image/png < \"$f\"", NULL }; +static const char *shotfullexec[] = { "/bin/sh", "-c", "mkdir -p ~/pics/screenshots; f=~/pics/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png; maim \"$f\" && xclip -selection clipboard -t image/png < \"$f\"", NULL }; static const Key keys[] = { /* modifier key function argument */ @@ -75,6 +77,8 @@ static const Key keys[] = { { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } }, { 0, XF86XK_AudioMute, spawn, {.v = volmutecmd } }, { 0, XF86XK_AudioMicMute, spawn, {.v = micmutecmd } }, + { 0, XK_Print, spawn, {.v = shotselexec } }, + { ShiftMask, XK_Print, spawn, {.v = shotfullexec } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, { MODKEY|ShiftMask, XK_a, spawn, {.v = mixercmd } }, { MODKEY, XK_b, togglebar, {0} }, -- cgit v1.2.3