From df71f78dfb0c3099981e5f122fcd82634ab8f9dc Mon Sep 17 00:00:00 2001 From: kdam0 Date: Tue, 11 Apr 2023 17:45:31 -0400 Subject: ref dwl config.h --- nixpkgs/.config/nixpkgs/common/dwl_4/config.h | 69 ++++++++++++++------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/nixpkgs/.config/nixpkgs/common/dwl_4/config.h b/nixpkgs/.config/nixpkgs/common/dwl_4/config.h index 3a3c768..d5107e2 100644 --- a/nixpkgs/.config/nixpkgs/common/dwl_4/config.h +++ b/nixpkgs/.config/nixpkgs/common/dwl_4/config.h @@ -116,42 +116,47 @@ static const char *brightdown[] = { "light", "-U", "10", NULL }; static const char *brightup[] = { "light", "-A", "10", NULL }; static const char *hibernatecmd[] = { "systemctl", "hibernate", NULL }; static const char *lockcmd[] = { "waylock", NULL }; +static const char scrotcmd[] = "slurp | \ + grim -g - - | \ + wl-copy && \ + notify-send 'Copied selection to clipboard!' && \ + wl-paste > $HOME/pics/$(date +'%Y-%m-%d-%H%M%S_grim.png')"; 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_j, focusstack, {.i = +1} }, - { MODKEY, XKB_KEY_k, focusstack, {.i = -1} }, - { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} }, - { MODKEY, XKB_KEY_d, incnmaster, {.i = -1} }, - { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} }, - { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} }, - { MODKEY, XKB_KEY_Return, zoom, {0} }, - { MODKEY, XKB_KEY_Tab, view, {0} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} }, - { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XKB_KEY_space, setlayout, {0} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} }, - { MODKEY, XKB_KEY_e, togglefullscreen, {0} }, - { MODKEY, XKB_KEY_0, view, {.ui = ~0} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} }, - { MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} }, - { MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less, tagmon, {.i = WLR_DIRECTION_LEFT} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater, tagmon, {.i = WLR_DIRECTION_RIGHT} }, + /* modifier key function argument */ + { MODKEY, XKB_KEY_p, spawn, {.v = menucmd} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} }, + { MODKEY, XKB_KEY_j, focusstack, {.i = +1} }, + { MODKEY, XKB_KEY_k, focusstack, {.i = -1} }, + { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} }, + { MODKEY, XKB_KEY_d, incnmaster, {.i = -1} }, + { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} }, + { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} }, + { MODKEY, XKB_KEY_Return, zoom, {0} }, + { MODKEY, XKB_KEY_Tab, view, {0} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} }, + { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} }, + { MODKEY, XKB_KEY_space, setlayout, {0} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} }, + { MODKEY, XKB_KEY_e, togglefullscreen, {0} }, + { MODKEY, XKB_KEY_0, view, {.ui = ~0} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} }, + { MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} }, + { MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_less, tagmon, {.i = WLR_DIRECTION_LEFT} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_greater, tagmon, {.i = WLR_DIRECTION_RIGHT} }, // custom binds - { 0, XKB_KEY_XF86AudioMute, spawn, {.v = volmute} }, - { 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = voldown} }, - { 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volup} }, - { 0, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brightdown} }, - { 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brightup} }, - { 0, XKB_KEY_Print, spawn, SHCMD("slurp | grim -g - - | wl-copy && notify-send 'Copied selection to clipboard!' && wl-paste > $HOME/pics/$(date +'%Y-%m-%d-%H%M%S_grim.png')") }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Delete, spawn, {.v = hibernatecmd} }, - { MODKEY, XKB_KEY_Delete, spawn, {.v = lockcmd} }, + { 0, XKB_KEY_XF86AudioMute, spawn, {.v = volmute} }, + { 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = voldown} }, + { 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volup} }, + { 0, XKB_KEY_XF86MonBrightnessDown, spawn, {.v = brightdown} }, + { 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = brightup} }, + { 0, XKB_KEY_Print, spawn, SHCMD(scrotcmd) }, + { MODKEY, XKB_KEY_Delete, spawn, {.v = lockcmd} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Delete, spawn, {.v = hibernatecmd} }, TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0), TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1), TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2), -- cgit v1.2.3