This commit is contained in:
meldafert 2024-02-25 21:04:21 +00:00 committed by GitHub
commit 164c6cd23e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def validate(plugin_config, plugin_settings):
command = None
if utility.DESKTOP_ENVIRONMENT == "gnome" and utility.IS_WAYLAND:
command = "dbus-send"
elif utility.DESKTOP_ENVIRONMENT == "sway":
elif utility.IS_WAYLAND:
command = "swayidle"
else:
command = "xprintidle"

View File

@ -171,7 +171,7 @@ def init(ctx, safeeyes_config, plugin_config):
long_break_duration = safeeyes_config.get('long_break_duration')
waiting_time = min(2, idle_time) # If idle time is 1 sec, wait only 1 sec
is_wayland_and_gnome = context['desktop'] == 'gnome' and context['is_wayland']
use_swayidle = context['desktop'] == 'sway'
use_swayidle = context['desktop'] != 'gnome' and context['is_wayland']
def __start_idle_monitor():