You are not logged in.

#1 2017-03-19 23:04:28

Torxed
Member
Registered: 2013-01-10
Posts: 200

scrot -s from awesome WM shortcuts?

Couldn't find anyone who's done it successfully yet.
Is it possible to call `scrot -s` from awesome spawn process calls?

    awful.key({                   }, "Print",
        function()
             awful.util.spawn("scrot -s",false)
        end),

    awful.key({ modkey,           }, "Print",
        function()
             awful.util.spawn("scrot -u",false)
        end),

The `modkey` bound one works, it simply snaps a screenshot of the currently selected window.
However, the `scrot -s` call appears to do nothing.

Any ideas on how to correct my sloppy binding?

Offline

#2 2017-03-19 23:32:35

Chuck Arch Linux
Member
Registered: 2011-06-23
Posts: 81

Re: scrot -s from awesome WM shortcuts?

Try this, for awesome 3.5

-- Screen Shot Selection Shortcut

    awful.key({ "Mod1", "Control" }, "c", function () awful.util.spawn_with_shell("sleep 0.5 && scrot /root/'%Y-%m-%d_%T_$wx$h.png' -s -q 100") end),

Hope it help

Offline

#3 2017-03-20 22:42:42

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: scrot -s from awesome WM shortcuts?

famous input grabbing conflict issue, "sleep 0.2;" (play with the time, but 0.2 works for me) first to give yourself some time to release the shortcut so that scrot can grab the X server.

Offline

#4 2020-03-20 23:53:29

baturvit
Member
Registered: 2019-01-13
Posts: 4

Re: scrot -s from awesome WM shortcuts?

Chuck Arch Linux wrote:

Try this, for awesome 3.5

-- Screen Shot Selection Shortcut

    awful.key({ "Mod1", "Control" }, "c", function () awful.util.spawn_with_shell("sleep 0.5 && scrot /root/'%Y-%m-%d_%T_$wx$h.png' -s -q 100") end),

Hope it help

thank you, man. helped so much

Offline

Board footer

Powered by FluxBB