A D-Bus service that controls split swayidle user services. It is mainly for personal use, and replace a previous version that created a bare wl surface.
Unfortunately, a recent update to sway stopped this from working.
Guayusa exposes a small D-Bus interface for switching between normal idle behavior, disabling only idle suspend, or disabling both lock/display-off and idle suspend.
normal: lock/display-off and suspend idle policies are enabledno-suspend: lock/display-off stays enabled, idle suspend is disabledno-idle: lock/display-off and idle suspend are disabled
The before-sleep lock policy is intentionally separate. Guayusa does not stop it, so manual suspend, lid-close suspend, and other non-idle sleep paths can still lock before sleep.
cargo build --releaseGuayusa manages these user units by default:
guayusa-swayidle-lock.serviceguayusa-swayidle-suspend.service
It also ships this independent unit:
guayusa-swayidle-before-sleep.service
Enable the units you want:
systemctl --user enable --now guayusa.service
systemctl --user enable --now guayusa-swayidle-lock.service
systemctl --user enable --now guayusa-swayidle-suspend.service
systemctl --user enable --now guayusa-swayidle-before-sleep.serviceRemove any direct swayidle launch from your Sway config. If Sway still starts its own swayidle process, Guayusa can stop the managed units while the unmanaged process continues enforcing idle actions.
The default managed unit names can be overridden for custom policy units:
# systemctl --user edit guayusa.service
[Service]
Environment=GUAYUSA_LOCK_UNIT=my-swayidle-lock.service
Environment=GUAYUSA_SUSPEND_UNIT=my-swayidle-suspend.serviceThe service is exposed at:
- Service name:
org.guayusa.IdleInhibitor - Object path:
/ - Interface:
org.guayusa.Idle
SetMode(string)- Setsnormal,no-suspend, orno-idleCycleMode()- Cyclesnormal -> no-suspend -> no-idle -> normalEnable()- Compatibility method; setsno-idleDisable()- Compatibility method; setsnormalToggle()- Compatibility method; toggles betweennormalandno-idleSetInhibit(bool)- Compatibility method;truesetsno-idle,falsesetsnormal
Mode- Current mode:normal,no-suspend,no-idle,custom, orunavailableStatus- Compatibility boolean; true forno-suspend,no-idle, andcustom
ModeChanged(string)StatusChanged(bool)
busctl --user call org.guayusa.IdleInhibitor / org.guayusa.Idle SetMode s no-suspend
busctl --user call org.guayusa.IdleInhibitor / org.guayusa.Idle SetMode s no-idle
busctl --user call org.guayusa.IdleInhibitor / org.guayusa.Idle SetMode s normal
busctl --user call org.guayusa.IdleInhibitor / org.guayusa.Idle CycleMode
busctl --user get-property org.guayusa.IdleInhibitor / org.guayusa.Idle Mode
busctl --user get-property org.guayusa.IdleInhibitor / org.guayusa.Idle StatusMonitor changes:
dbus-monitor --session "type='signal',interface='org.guayusa.Idle'"swayidle- systemd user manager
- D-Bus session bus
This project is licensed under the MIT License.