Sweets

Commands

Control sweetidle from the terminal and scripts

sweetidle <command> talks to the running daemon and exits.

CommandDoes
statusShow pause state, listeners, idle hint, and inhibitors
status --jsonSame as one JSON object
pauseStop idle timers and clear the idle hint
resumeRestart idle timers from zero
reloadQueue a config reload
sweetidle status --json | jq -r .paused

pause doesn't stop running commands or sleep and lock hooks.

Reload

sweetidle reload
# or
systemctl --user reload sweetidle.service

Check 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

OptionDoes
-c, --config <path>Use another config file
--check-configValidate the config and exit
-v, --verboseDebug logging
-h, --helpShow usage
-V, --versionShow the version

Exit codes: 0 success, 2 any error.

Signals

SignalDoes
SIGINT, SIGTERMStop the daemon. Running commands keep running
SIGHUPSame as reload

Files

PathPurpose
~/.config/sweetidle/config.tomlConfig file
$XDG_RUNTIME_DIR/sweetidle.sockControl socket

Full reference: man sweetidle.

On this page