dshoreman / nextshot

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

Make it possible to force Wayland mode #36

Closed dshoreman closed 5 years ago

dshoreman commented 5 years ago

The current $WAYLAND_DISPLAY check should work in most cases, there is at least one where it will fail.

If you attempt to start Nextshot from within a tmux session that was started in X, the WAYLAND_DISPLAY environment variable will not be set regardless of whether you're currently using X or Wayland.

It may be possible to check the output of tty (which will either be /dev/ttyX or /dev/pts/X), but there's a good chance that could have the same issues as the env var.