1swayidle(1)                 General Commands Manual                swayidle(1)
2
3
4

NAME

6       swayidle - Idle manager for Wayland
7

SYNOPSIS

9       swayidle [options] [events...]
10

OPTIONS

12       -C <path>
13           The config file to use. By default, the following paths are checked
14           in the following order: $XDG_CONFIG_HOME/swayidle/config,
15           $HOME/swayidle/config Config file entries are events as described
16           in the EVENTS section. Specifying events in the config and as argu‐
17           ments is not mutually exclusive.
18
19       -h
20           Show help message and quit.
21
22       -d
23           Enable debug output.
24
25       -w
26           Wait for command to finish executing before continuing, helpful for
27           ensuring that a before-sleep command has finished before the system
28           goes to sleep.
29
30           Note: using this option causes swayidle to block until the command
31           finishes.
32
33       -S <seat-name>
34           Specify which seat to use. By default, if no name is specified, an
35           arbitrary seat will be picked instead.
36

DESCRIPTION

38       swayidle listens for idle activity on your Wayland compositor and exe‐
39       cutes tasks on various idle-related events. You can specify any number
40       of events at the command line and in the config file.
41

EVENTS

43       timeout <timeout> <timeout command> [resume <resume command>]
44           Execute timeout command if there is no activity for <timeout> sec‐
45           onds.
46
47           If you specify "resume <resume command>", resume command will be
48           run when there is activity again.
49
50       before-sleep <command>
51           If built with systemd support, executes command before systemd puts
52           the computer to sleep.
53
54           Note: this only delays sleeping up to the limit set in
55           logind.conf(5) by the option InhibitDelayMaxSec. A command that has
56           not finished by then will continue running after resuming from
57           sleep.
58
59       after-resume <command>
60           If built with systemd support, executes command after logind sig‐
61           nals that the computer resumed from sleep.
62
63       lock <command>
64           If built with systemd support, executes command when logind signals
65           that the session should be locked
66
67       unlock <command>
68           If built with systemd support, executes command when logind signals
69           that the session should be unlocked
70
71       idlehint <timeout>
72           If built with systemd support, set IdleHint to indicate an idle
73           logind/elogind session after <timeout> seconds. Adding an idlehint
74           event will also cause swayidle to call SetIdleHint(false) when run,
75           on resume, unlock, etc.
76
77       All commands are executed in a shell.
78

SIGNALS

80       swayidle responds to the following signals:
81
82       SIGTERM, SIGINT
83           Run all pending resume commands. When finished swayidle will termi‐
84           nate.
85
86       SIGUSR1
87           Immediately enter idle state.
88

EXAMPLE

90           swayidle -w \
91                timeout 300 'swaylock -f -c 000000' \
92                timeout 600 'swaymsg "output * dpms off"' \
93                     resume 'swaymsg "output * dpms on"' \
94                before-sleep 'swaylock -f -c 000000'
95
96       This will lock your screen after 300 seconds of inactivity, then turn
97       off your displays after another 300 seconds, and turn your screens back
98       on when resumed. It will also lock your screen before your computer
99       goes to sleep.
100
101       To make sure swayidle waits for swaylock to lock the screen before it
102       releases the inhibition lock, the -w options is used in swayidle, and
103       -f in swaylock.
104

AUTHORS

106       Maintained by Drew DeVault <sir@cmpwn.com>, who is assisted by other
107       open source contributors. For more information about swayidle develop‐
108       ment, see https://github.com/swaywm/swayidle.
109

SEE ALSO

111       sway(5) swaymsg(1) sway-input(5) sway-output(5) sway-bar(5) loginctl(1)
112
113
114
115                                  2023-07-22                       swayidle(1)
Impressum