dshoreman / nextshot

A simple tool for taking screenshots on Linux and sharing via Nextcloud
GNU General Public License v2.0
42 stars 3 forks source link

Clipboard check always looks for xclip #75

Closed dshoreman closed 2 years ago

dshoreman commented 2 years ago

If you run nextshot -p to paste from clipboard, it calls check_clipboard to check there's an image to paste.

This function relies on is_wayland which is only set in parse_environment after options are parsed. This is a problem here because check_clipboard is called during arg-parsing, thus NEXTSHOT_ENV isn't set yet (if autodetection is being relied on).