Skip to content

Commit a5170c7

Browse files
committed
screensaver: rename lock_screen to is_long_break
1 parent dce9d69 commit a5170c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

safeeyes/plugins/screensaver/plugin.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from safeeyes.model import TrayAction
2828

2929
context = None
30-
lock_screen = False
30+
is_long_break: bool = False
3131
user_locked_screen = False
3232
lock_screen_command = None
3333
min_seconds = 0
@@ -134,15 +134,15 @@ def init(ctx, safeeyes_config, plugin_config):
134134

135135
def on_start_break(break_obj):
136136
"""Determine the break type and only if it is a long break, enable the
137-
lock_screen flag.
137+
is_long_break flag.
138138
"""
139-
global lock_screen
139+
global is_long_break
140140
global seconds_passed
141141
global user_locked_screen
142142
user_locked_screen = False
143143
seconds_passed = 0
144144
if lock_screen_command:
145-
lock_screen = break_obj.is_long_break()
145+
is_long_break = break_obj.is_long_break()
146146

147147

148148
def on_countdown(countdown, seconds):
@@ -155,7 +155,7 @@ def on_stop_break():
155155
"""Lock the screen after a long break if the user has not skipped within
156156
min_seconds.
157157
"""
158-
if user_locked_screen or (lock_screen and seconds_passed >= min_seconds):
158+
if user_locked_screen or (is_long_break and seconds_passed >= min_seconds):
159159
__lock_screen_now()
160160

161161

0 commit comments

Comments
 (0)