Hacker News new | ask | show | jobs
by johnchristopher 1926 days ago
Anyone knows how to bind the printscreen key to automated flameshot screenshoting ? (using awesome/sway/thingslikethat).

I'd like to emulate spectacle (kde screenshot tool) that allows a 2 seconds delay between rectangular area or application to be screenshoted.

3 comments

For AwesomeWM, I have this in my rc.lua in the globalkeys table:

  awful.key({ }, "Print", function () awful.spawn("flameshot gui") end,
            {description = "Make a screenshot (relies on flameshot)", group = "clipboard"})
Tangentially related, here's my screenshot command for grim that you could easily build a sleep into:

command_screenshot_interactive = grim -g "$(slurp)" - | tee $(xdg-user-dir DOCUMENTS)/screencap/$(date +%Y-%m-%dT%H:%M:%SZ).png | wl-copy

In i3 (and therefor sway) you can use bindsym. I don't know it off the top of my head, but it should be easy enough to find. The "-d" option with flameshot is used to have delays.