Open gacou54 opened 3 years ago
Why not simply
mainExists = not subprocess.call(['which', 'maim'])
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.
@gacou54 This now has conflicts
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.
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 formaim
(highly inspired by https://github.com/asweigart/pyautogui/pull/83/files#).The tests pass and the
pyscreeze
library (andpyautogui
) now works on my Fedora machine.