mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-31 02:19:58 +03:00
Update src/PIL/ImageGrab.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
674b2395f4
commit
29b64ea926
|
@ -89,10 +89,10 @@ def grab(
|
||||||
if display_name is None and sys.platform not in ("darwin", "win32"):
|
if display_name is None and sys.platform not in ("darwin", "win32"):
|
||||||
if shutil.which("gnome-screenshot"):
|
if shutil.which("gnome-screenshot"):
|
||||||
args = ["gnome-screenshot", "-f"]
|
args = ["gnome-screenshot", "-f"]
|
||||||
elif shutil.which("spectacle"):
|
|
||||||
args = ["spectacle", "-n", "-b", "-f", "-o"]
|
|
||||||
elif shutil.which("grim"):
|
elif shutil.which("grim"):
|
||||||
args = ["grim"]
|
args = ["grim"]
|
||||||
|
elif shutil.which("spectacle"):
|
||||||
|
args = ["spectacle", "-n", "-b", "-f", "-o"]
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
fh, filepath = tempfile.mkstemp(".png")
|
fh, filepath = tempfile.mkstemp(".png")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user