naelstrof / maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Other
2.17k stars 79 forks source link

maim includes bspwm's borders #210

Open reinzanini opened 4 years ago

reinzanini commented 4 years ago

Even with -n 2, maim still includes bspwm's borders in its screenshots

Example of a command: maim -B -u -s -n 2 | xclip -selection c -t image/png Result: image

timakro commented 3 years ago

Same issue with xmonad. Setting border here to zero hides the border on the screenshot.

Currently there is only --nodecorations which deals with more complex window decorations which are really their own X windows. I assume (and this is just a guess) more complex desktop environments like GNOME or KDE use this kind of extra wrapper window for the title bar, etc.

I suggest adding an extra option --noborder to maim which removes the border in WMs like xmonad, bspwm as proposed above. I'm willing to make a PR for this, what do you think @naelstrof? How does i3 fit into this I wonder?

timakro commented 3 years ago

Alternatively we could add --nodecorations 3 which would do the same recursive window descent as --nodecorations 2 and set the border to zero as well. I prefer the --noborder option because it clearly separates the border removal from the window descent approach.