Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
swayidle(1)		    General Commands Manual		   swayidle(1)

NAME
       swayidle	- Idle manager for Wayland

SYNOPSIS
       swayidle	[options] [events...]

OPTIONS
       -C <path>
	   The config file to use. By default, the following paths are checked
	   in	 the	following   order:   $XDG_CONFIG_HOME/swayidle/config,
	   $HOME/swayidle/config Config	file entries are events	 as  described
	   in the EVENTS section. Specifying events in the config and as argu-
	   ments is not	mutually exclusive.

       -h
	   Show	help message and quit.

       -d
	   Enable debug	output.

       -w
	   Wait	for command to finish executing	before continuing, helpful for
	   ensuring that a before-sleep	command	has finished before the	system
	   goes	to sleep.

	   Note:  using	this option causes swayidle to block until the command
	   finishes.

       -S <seat-name>
	   Specify which seat to use. By default, if no	name is	specified,  an
	   arbitrary seat will be picked instead.

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

EVENTS
       timeout <timeout> <timeout command> [resume <resume command>]
	   Execute  timeout command if there is	no activity for	<timeout> sec-
	   onds.

	   If you specify "resume <resume command>", resume  command  will  be
	   run when there is activity again.

       before-sleep <command>
	   If  built  with  ConsoleKit2	 support, executes command before Con-
	   soleKit2 puts the computer to sleep.

	   Note:  this	only  delays  sleeping	up  to	the   limit   set   in
	   logind.conf(5) by the option	InhibitDelayMaxSec. A command that has
	   not	finished  by  then  will  continue running after resuming from
	   sleep.

       after-resume <command>
	   If built with ConsoleKit2  support,	executes  command  after  Con-
	   soleKit2 signals that the computer resumed from sleep.

       lock <command>
	   If  built  with  ConsoleKit2	 support,  executes  command when Con-
	   soleKit2 signals that the session should be locked

       unlock <command>
	   If built with  ConsoleKit2  support,	 executes  command  when  Con-
	   soleKit2 signals that the session should be unlocked

       idlehint	<timeout>
	   If built with ConsoleKit2 support, set IdleHint to indicate an idle
	   ConsoleKit2	session	 after	<timeout>  seconds. Adding an idlehint
	   event will also cause swayidle to call SetIdleHint(false) when run,
	   on resume, unlock, etc.

       All commands are	executed in a shell.

SIGNALS
       swayidle	responds to the	following signals:

       SIGTERM,	SIGINT
	   Run all pending resume commands. When finished swayidle will	termi-
	   nate.

       SIGUSR1
	   Immediately enter idle state.

EXAMPLE
	   swayidle -w \
		timeout	300 'swaylock -f -c 000000' \
		timeout	600 'swaymsg "output * dpms off"' \
		     resume 'swaymsg "output * dpms on"' \
		before-sleep 'swaylock -f -c 000000'

       This will lock your screen after	300 seconds of inactivity,  then  turn
       off your	displays after another 300 seconds, and	turn your screens back
       on  when	 resumed.  It  will also lock your screen before your computer
       goes to sleep.

       To make sure swayidle waits for swaylock	to lock	the screen  before  it
       releases	 the  inhibition lock, the -w options is used in swayidle, and
       -f in swaylock.

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

SEE ALSO
       sway(5) swaymsg(1) sway-input(5)	sway-output(5) sway-bar(5) loginctl(1)

				  2025-04-13			   swayidle(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=swayidle&sektion=1&manpath=FreeBSD+Ports+14.3.quarterly>

home | help