feat: allow starting in a locked state
This commit is contained in:
1 parent
78c7ed7014
commit
78ce66314f
3 files changed
+6
-1
No files matched your search
@@ -44,6 +44,9 @@ The options listed here are not editable from within the user interface.
|
||||
# Auto-lock the screen after a period of inactivity (in seconds)
|
||||
# 0 means disabled
|
||||
# autolock_timeout: 0
|
||||
|
||||
# Start KlipperScreen with the screen locked
|
||||
# start_locked: False
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
@@ -162,7 +162,7 @@ class KlipperScreenConfig:
|
||||
bools = (
|
||||
'invert_x', 'invert_y', 'invert_z', '24htime', 'only_heaters', 'show_cursor', 'confirm_estop',
|
||||
'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard',
|
||||
'show_heater_power', "show_scroll_steppers", "auto_open_extrude"
|
||||
'show_heater_power', "show_scroll_steppers", "auto_open_extrude", "start_locked"
|
||||
)
|
||||
strs = (
|
||||
'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking_printing', 'font_size',
|
||||
|
||||
@@ -183,6 +183,8 @@ class KlipperScreen(Gtk.Window):
|
||||
self.lock_screen.set_autolock_timeout(autolock)
|
||||
self.log_notification("KlipperScreen Started", 1)
|
||||
self.initial_connection()
|
||||
if self._config.get_main_config().getboolean('start_locked', False):
|
||||
self.lock_screen.lock(None)
|
||||
|
||||
def update_cursor(self, show: bool):
|
||||
self.show_cursor = show
|
||||
|
||||
Reference in new issue
Block a user