Skip to content

Allow restarting shell when desktop locked - #11240

Open
nick1udwig wants to merge 1 commit into
omacom:quattrofrom
nick1udwig:feat/restart-shell-when-desktop-locked
Open

nick1udwig wants to merge 1 commit into
omacom:quattrofrom
nick1udwig:feat/restart-shell-when-desktop-locked

Conversation

@nick1udwig

Copy link
Copy Markdown

Problem

Developing plugins can require restarting the shell.
Developers might reasonably want to lock their machine and continue development with a remote solution (ChatGPT remote, Claude remote control, etc).
However, omarchy-restart-shell refuses to run if the machine is locked because the locker is run in the shell and if the shell fails to restart the session may be unrecoverable.

Solution

Split out the locker into its own shell, removing the risk of breaking the locker when restarting the shell.

Notes

Why not just turn on screensaver instead of locking?

If I want to develop a plugin that requires restarting the shell right now, I have to either sit at my keyboard OR leave my system unlocked.
This dichotomy is not great: either make devex worse or security worse.

In general, as much dev as possible should be able to be done securely and remotely from my machine.
This PR is in that spirit.

Splitting out the locker only costs ~20MiB private memory and ~30 MiB PSS at peak

With narenas:2, the locker only uses ~20MiB more private memory and ~30MiB PSS at peak than the current quattro branch.

Benchmark: locker.py. Use like:

python3 test/benchmarks/locker.py --baseline eb56446c --output "$HOME/Work/benchmarks/locker-$(date +%Y%m%d-%H%M%S)" --pairs 1 --seconds 20 --warmup 10 --cycles 8 --restarts 1 --interval 2

@jandrusk

Copy link
Copy Markdown

Big architectural change (independent lock.qml + restart-while-locked). Direction makes sense for plugin/dev workflows, but:

  • Branch conflicts with quattro — needs a rebase.
  • Please spell out the upgrade path when an integrated locker is still the active lock client (refuse vs migrate vs dual-run), and how omarchy-restart-shell behaves if the independent locker fails to become secure while Hyprland already considers the session locked.
  • Related: Keep the shell supervisor attached after a locked Hyprland restart #13490 (supervisor across locked Hyprland restart).

I'd treat this as a product/security-sensitive review rather than a drive-by merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants