noctalia-shell icon indicating copy to clipboard operation
noctalia-shell copied to clipboard

[FEATURE] Add IPC for idle Lock and Suspend

Open shaplyd opened this issue 2 months ago • 0 comments

Submission checklist

  • [x] I have searched existing issues and confirmed this has not been requested before.
  • [x] I have checked existing pull requests for similar changes.

Feature type

Developer / API improvement

Feature summary

IPC command to enable and disable lock and suspend like noctalia msg caffeine-enable and noctalia msg caffeine-disable

Motivation / use case

To use with battery hooks to stop suspend when connected to wall power

Proposed solution

noctalia msg idle-lock-and-suspend-enable

noctalia msg idle-lock-and-suspend-disable

Alternatives considered

sed -i '/\[idle\.behavior\.lock-and-suspend\]/,/^ *$/ s/enabled = true/enabled = false/' "$(readlink -f ~/.local/state/noctalia/settings.toml)"

sed -i '/\[idle\.behavior\.lock-and-suspend\]/,/^ *$/ s/enabled = false/enabled = true/' "$(readlink -f ~/.local/state/noctalia/settings.toml)"

References / related projects

No response

Additional context

No response

shaplyd avatar Sep 23 '26 13:09 shaplyd