Skip to content

Commit

Permalink
Add Wayland to debug dialog environment section
Browse files Browse the repository at this point in the history
Part of #202
  • Loading branch information
otsaloma committed Jan 15, 2023
1 parent f39bb02 commit e2d6f84
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gaupol/dialogs/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import aeidon
import gaupol
import linecache
import os
import platform
import sys
import traceback
Expand Down Expand Up @@ -84,8 +85,13 @@ def _insert_environment(self):
"""Insert information about user's platform and environment."""
locale = aeidon.locales.get_system_code()
encoding = aeidon.encodings.get_locale_code()
wayland = "yes" if (
os.getenv("XDG_SESSION_TYPE", "") == "wayland" or
os.getenv("WAYLAND_DISPLAY", "")
) else "no"
self._insert_text("Platform: {}\n".format(platform.platform(True)))
self._insert_text("Locale: {}.{}\n\n".format(locale, encoding))
self._insert_text("Locale: {}.{}\n".format(locale, encoding))
self._insert_text("Wayland: {}\n\n".format(wayland))

def _insert_dependencies(self):
"""Insert version numbers of selected dependencies."""
Expand Down

0 comments on commit e2d6f84

Please sign in to comment.