Add Print key binding for snipping tool

Binds the Print key to snip.sh (slurp+grim+wl-clipboard), spawned the
same way as the volume/brightness scripts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 21:53:35 +02:00
co-authored by Claude Sonnet 5
parent afd0badfb1
commit 2ae5cf7912
+2
View File
@@ -131,6 +131,7 @@ static const char *volmute[] = { "/home/irrlicht/nixos/scripts/volume.sh",
static const char *brigup[] = { "/home/irrlicht/nixos/scripts/brightness.sh", "up", NULL }; static const char *brigup[] = { "/home/irrlicht/nixos/scripts/brightness.sh", "up", NULL };
static const char *brigdown[] = { "/home/irrlicht/nixos/scripts/brightness.sh", "down", NULL }; static const char *brigdown[] = { "/home/irrlicht/nixos/scripts/brightness.sh", "down", NULL };
static const char *lockcmd[] = { "waylock", NULL }; static const char *lockcmd[] = { "waylock", NULL };
static const char *snipcmd[] = { "/home/irrlicht/nixos/scripts/snip.sh", NULL };
static const Key keys[] = { static const Key keys[] = {
/* Note that Shift changes certain key codes: 2 -> at, etc. */ /* Note that Shift changes certain key codes: 2 -> at, etc. */
@@ -172,6 +173,7 @@ static const Key keys[] = {
{ 0, XKB_KEY_XF86AudioMute, spawn, {.v = volmute} }, { 0, XKB_KEY_XF86AudioMute, spawn, {.v = volmute} },
{ 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brigup} }, { 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brigup} },
{ 0, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brigdown} }, { 0, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brigdown} },
{ 0, XKB_KEY_Print, spawn, {.v = snipcmd} },
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */ /* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} }, { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },