Closed edisonhello closed 3 years ago
Something definitely is wrong with pipe. Try wrapping execution in sh -c, like this:
awful.util.spawn("sh -c 'maim | xclip -selection clipboard -t image/png -i'") end),
This issue has nothing to do about Awesome-wm. @naelstrof I think it should be closed.
Thanks!
I'm using like this:
awful.key({}, "Print", function ()
awful.spawn.with_shell("maim ~/Imagens/Screenshots/Screenshot_$(date +%Y%m%d)_$(date +%H%M%S).png", false) end,
{description = "Print desktop", group = "Screenshot"}),
awful.key({ modkey }, "Print", function ()
awful.spawn.with_shell("maim -i $(xdotool getactivewindow) ~/Imagens/Screenshots/Screenshot_$(date +%Y%m%d)_$(date +%H%M%S).png", false) end,
{description = "Print window", group = "Screenshot"}),
awful.key({ "Shift" }, "Print", nil, function ()
awful.spawn.with_shell("maim -s ~/Imagens/Screenshots/Screenshot_$(date +%Y%m%d)_$(date +%H%M%S).png", false) end,
{description = "Print area", group = "Screenshot"}),
awful.key({ "Control" }, "Print", nil, function ()
awful.spawn.with_shell("maim -s | xclip -selection c -t image/png", false) end,
{description = "Print area to clipboard", group = "Screenshot"}),`
ye, spawn.with_shell
definitely sounds like a cleaner solution.
As title. My awesome config about this part:
Above two line work while another two always cause seg fault. I tried change the key combination (like modkey + p) but the result still same.
Output of journalctl:
Also,
maim | xclip -selection clipboard -t image/png -i
in terminal works fine.