swayidle

Manage idle states and execute actions on Wayland compositors.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/milojarow/dotfiles --skill swayidle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swayidle
Source: https://github.com/milojarow/dotfiles/tree/main/.claude/skills/swayidle
Command: npx skills add https://github.com/milojarow/dotfiles --skill swayidle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates actions based on user inactivity in Wayland environments, such as locking the screen, turning off displays, or running commands before system sleep.

Core Features & Use Cases

  • Screen Locking: Automatically lock your screen after a specified period of inactivity.
  • Display Power Management: Turn off displays to save power when the system is idle.
  • Sleep/Resume Actions: Execute commands before the system goes to sleep and after it resumes.
  • Use Case: Configure your system to lock the screen after 5 minutes of inactivity, turn off the displays after 10 minutes, and ensure the screen is locked again before the system sleeps.

Quick Start

Configure swayidle to lock the screen after 300 seconds of inactivity and turn off displays after 600 seconds.

Frequently Asked Questions about swayidle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically lock my screen and turn off displays after inactivity in Wayland?

To configure Wayland idle management, you define inactivity timeouts for specific actions like screen locking or display power-off. This Skill supports configuration via command-line arguments or a dedicated config file to establish flexible event handling on Sway compositors.

Can I run specific commands before my Wayland system goes to sleep and after it resumes?

This Skill handles sleep and resume actions by executing pre-sleep and post-resume commands triggered by user inactivity timeouts. It ensures your screen is locked and commands are executed before system sleep and after it resumes on Wayland compositors.

Does swayidle work with all Wayland compositors or only Sway?

This Skill manages idle states and executes actions on Wayland compositors like Sway. It relies on the Wayland idle management protocol to handle screen locking, display power management, and sleep actions based on configured inactivity timeouts.

What is the best way to configure idle management timeouts for screen locking in Wayland?

You can configure idle management timeouts via command-line arguments or a dedicated config file for flexible event handling. This Skill enables setting specific inactivity periods, such as locking the screen after 300 seconds and turning off displays after 600 seconds.