Compare commits

...

2 Commits

Author SHA1 Message Date
meldafert f6272f0717
Merge a5a7185065 into 4f7cbc4d93 2024-02-07 11:02:27 -08:00
Mel Dafert a5a7185065
smartpause: use swayidle on all non-gnome wayland sessions 2023-12-12 13:06:46 +01:00
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():