Skip to main content
otter-idle watches for inactivity and runs configured commands, usually loginctl lock-session or display power-off. It hooks into systemd-logind for sleep and screen saver inhibition.

Usage

otter-idle
Autostart at login: see Session setup.

Configuration

Config file: ~/.config/otter-shell/otter-idle.conf
lock_cmd = pidof otter-lock || otter-lock
unlock_cmd =

before_sleep_cmd = loginctl lock-session
after_sleep_cmd = dpms:on

ignore_dbus_inhibit = false
ignore_systemd_inhibit = false

# Lock after 5 minutes idle
listener_1_timeout = 300
listener_1_on_timeout = loginctl lock-session
listener_1_on_resume =

# DPMS off after 6 minutes, on when active
listener_2_timeout = 360
listener_2_on_timeout = dpms:off
listener_2_on_resume = dpms:on
Up to 8 listeners (listener_1 through listener_8). Each has:
FieldDescription
timeoutIdle seconds before firing (0 = disabled)
on_timeoutCommand when user becomes idle
on_resumeCommand when activity resumes (only if on_timeout ran)

Built-in DPMS commands

CommandEffect
dpms:offTurn displays off
dpms:onTurn displays on
dpms:standbyStandby mode
dpms:suspendSuspend mode
Any other value runs as a shell command via /bin/sh -c. DPMS backend selection:
  1. wlr-output-power-management-unstable-v1 (preferred)
  2. Compositor IPC fallback (Hyprland, Sway, Niri detected from $XDG_CURRENT_DESKTOP)

Inhibitor handling

Three layers can block idle actions:
  1. Wayland-native (zwp_idle_inhibit_manager_v1): handled by compositor
  2. D-Bus (org.freedesktop.ScreenSaver): tracked by otter-idle (video players, etc.)
  3. systemd (loginctl inhibit): checked via logind ListInhibitors
Set ignore_dbus_inhibit = true or ignore_systemd_inhibit = true to skip those checks.

Logind integration

Responds to logind Lock, Unlock, and PrepareForSleep signals. Default lock_cmd keeps otter-lock available when a lock is requested.