This doesn’t seem to work. Can anyone please advise the best west to accomplish this? I’m just trying to make it so that whatever window or workspace I am in I can hit mod+shift+s and activate scrot so that I can select a section of the screen and send it to my clipboard.
Some tools (such as import or xdotool) might be unable to run upon a KeyPress event, because the keyboard/pointer is still grabbed. For these situations, the --release flag can be used, which will execute the command after the keys have been released.
That worked. Thank you for pointing me in the right direction.
I still needed to use xclip to send it to the clipboard. So here is what I did in case anyone else finds it useful. It removes the annoying beep noise, freezes the screen, gives the selection tool and copies to clipboard.
bindsym --release $mod+Shift+s exec scrot -z -f -s -e 'xclip -selection clipboard -t image/png -i $f && rm $f' && notify-send "Screenshot has been copied to clipboard"