Commands
Control sweetidle from the terminal and scripts
sweetidle <command> talks to the running daemon and exits.
| Command | Does |
|---|---|
status | Show pause state, listeners, idle hint, and inhibitors |
status --json | Same as one JSON object |
pause | Stop idle timers and clear the idle hint |
resume | Restart idle timers from zero |
reload | Queue a config reload |
sweetidle status --json | jq -r .pausedpause doesn't stop running commands or sleep and lock hooks.
Reload
sweetidle reload
# or
systemctl --user reload sweetidle.serviceCheck the logs for the result.
- An invalid config keeps the old one active.
- Changing a listener that already timed out rejects the reload. Retry once you're active again.
- D-Bus or logind changes need a restart. So does adding the first or removing the last sleep hook on FreeBSD.
Options
| Option | Does |
|---|---|
-c, --config <path> | Use another config file |
--check-config | Validate the config and exit |
-v, --verbose | Debug logging |
-h, --help | Show usage |
-V, --version | Show the version |
Exit codes: 0 success, 2 any error.
Signals
| Signal | Does |
|---|---|
SIGINT, SIGTERM | Stop the daemon. Running commands keep running |
SIGHUP | Same as reload |
Files
| Path | Purpose |
|---|---|
~/.config/sweetidle/config.toml | Config file |
$XDG_RUNTIME_DIR/sweetidle.sock | Control socket |
Full reference: man sweetidle.