diff options
| author | Kumar Damani <me@kumardamani.net> | 2026-09-03 20:13:55 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2026-09-03 20:13:55 +0000 |
| commit | da84737afb7d4f7c47c4b84582db37467949a0f8 (patch) | |
| tree | 264fd386e05f45d326b0b274e7085fed620aaf01 /config.h | |
| parent | 8944a0ce51f300353ca410fec87757f3536581dc (diff) | |
bind screenshot commands to prtsc
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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} }, |
