From 65427796a4a3687fb7ba115bf3b5ccb6ab027f6e Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Fri, 12 Jan 2024 22:07:08 +0100 Subject: [PATCH] add keybinds for screenshot and wmenu --- config.def.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/config.def.h b/config.def.h index 200faa7..0581951 100644 --- a/config.def.h +++ b/config.def.h @@ -125,15 +125,12 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } -/* commands */ -static const char *termcmd[] = { "foot", NULL }; -static const char *menucmd[] = { "bemenu-run", NULL }; - static const Key keys[] = { /* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */ /* modifier key function argument */ - { MODKEY, XKB_KEY_p, spawn, {.v = menucmd} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} }, + { MODKEY, XKB_KEY_p, spawn, SHCMD("dmenu_path | wmenu | xargs -I_-_ /bin/sh -c \"exec _-_\"") }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_S, spawn, SHCMD("slurp | grim -g - - | wl-copy -t image/png") }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = { "foot", NULL } } }, { MODKEY, XKB_KEY_j, focusstack, {.i = +1} }, { MODKEY, XKB_KEY_k, focusstack, {.i = -1} }, { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },