spacr.qt.safespacr

Safe-mode launcher: the least spaCR that can still change a setting.

When a saved preference is what makes spaCR die on launch there is otherwise no way in – the ordinary start reads that preference before it has drawn anything. safespacr reads every preference as its default instead, forces off the parts that are known to be able to take the process down with them, and opens far enough for the user to change a value and save it.

WRITES ARE NOT SHADOWED. Reading defaults is what makes safe mode start; writing to the real store is what makes it useful. A safe mode that saved to a scratch file would leave the broken value in place and the next ordinary start would die again on it.

Functions

main(→ int)

Launch spaCR with preferences read as defaults and extras off.

Module Contents

spacr.qt.safespacr.main(argv: list[str] | None = None) → int[source]

Launch spaCR with preferences read as defaults and extras off.

Parameters:

argv – Optional spaCR command-line arguments. None reads sys.argv[1:].

Returns:

Application exit code from spacr.qt.run().