asweigart / pyscreeze

PyScreeze is a simple, cross-platform screenshot module for Python 2 and 3.
BSD 3-Clause "New" or "Revised" License
194 stars 96 forks source link

Supporting maim for screenshots on Linux #69

Open gacou54 opened 3 years ago

gacou54 commented 3 years ago

Related to #28

Since Fedora Linux distribution does not support scrot anymore (https://bugzilla.redhat.com/show_bug.cgi?id=1770415), I add the support for maim (highly inspired by https://github.com/asweigart/pyautogui/pull/83/files#).

The tests pass and the pyscreeze library (and pyautogui) now works on my Fedora machine.

socal-nerdtastic commented 3 years ago

Why not simply

mainExists = not subprocess.call(['which', 'maim'])
gacou54 commented 3 years ago

I simply used the same code as for the scrot detection in order to conform to the current style of the code.

If the maintainer doesn't mind refactoring some code (the scrot detection), subprocresse.call would be better in my opinion, but otherwise, I think it's better to stick to the current code style.

Avasam commented 3 months ago

@gacou54 This now has conflicts

gacou54 commented 2 months ago

The idea to add maim was to make pyscreeze usable for wayland systems.

Adding gnome-screenshot fixes this. You can close this PR, unless you really want to support maim.