A modern Wayland idle manager that knows when to step back.
Keep your session in perfect balanceโautomatically preventing idle when it matters, allowing it when it doesn't.
Warning
Stasis Has Just received a major update with some breaking changes. Please see wiki for details.
Join the Official Stasis Discord!
๐ Click here to join the community
Features โข Installation โข Quick Start โข Compositor Support โข Contributing
Stasis doesn't just lock your screen after a timerโit understands context. Watching a video? Reading a document? Playing music? Stasis detects these scenarios and intelligently manages idle behavior, so you never have to jiggle your mouse to prevent an unwanted screen lock.
- ๐ง Smart idle detection with configurable timeouts
- ๐ต Media-aware idle handling โ automatically detects media playback
- ๐ซ Application-specific inhibitors โ prevent idle when specific apps are running
- โธ๏ธ Idle inhibitor respect โ honors Wayland idle inhibitor protocols
- ๐ Lid events via DBus โ detect laptop lid open/close events to manage idle
- โ๏ธ Flexible action system โ supports named action blocks and custom commands
- ๐ Regex pattern matching โ powerful app filtering with regular expressions
- ๐ Clean configuration โ uses the intuitive RUNE configuration language
- โก Live reload โ update configuration without restarting the daemon
Stasis is evolving! Hereโs whatโs currently in progress, planned, and potential future features. Items are grouped to show whatโs happening now and whatโs coming next.
- Sequential action blocks โ Action blocks run in the exact order defined in your config. Stasis maintains an internal index to track progress, making execution smarter and more reliable.
- Lock-centric design โ When a
lock-screenaction block is present and properly configured, Stasis tracks the PID of the command it executes to ensure the sequence stays intact. - Resume-command support โ Each action block can run an optional follow-up command after completion.
- Event-driven, minimal polling โ Stasis now relies primarily on two internal loops that notify others to wake from deep sleep, significantly reducing CPU and memory usage at idle.
- CLI per-state triggers โ Trigger a specific state, the current state, or all states, all while respecting previously completed actions.
- User profiles / presets โ save and load different workflows for various scenarios (work, gaming, etc.).
- Custom notifications โ display alerts for idle events or action execution.
- Logging & analytics โ historical idle data for power/performance insights.
- Power-saving optimizations โ CPU/GPU-aware idle handling.
Install the stable release or latest development version:
# Stable release
yay -S stasis
# Or latest git version
yay -S stasis-gitWorks with paru too:
paru -S stasisplease note the note at the bottom about flakes and nix.
If you use Nix flakes, stasis provides a flake.nix so you can build or
consume the package directly from flakes.
Quick ways to use stasis from flakes:
- Build directly from the remote flake (no local checkout required):
# build the stasis package from GitHub
nix build 'github:saltnpepper97/stasis#stasis'- Add
stasisas an input in your ownflake.nixand reference the package in your outputs or NixOS configuration. Example (snippet):
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
stasis.url = "github:saltnpepper97/stasis";
};
outputs = { self, nixpkgs, ... }:
let
system = "x86_64-linux"; # adjust for your host
in {
# reference the stasis package from the stasis flake
packages.${system}.my-stasis = self.inputs.stasis.packages.${system}.stasis;
# Or add it to a NixOS configuration
nixosConfigurations.<host> = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
configuration = {
environment.systemPackages = [ self.inputs.stasis.packages.${system}.stasis ];
};
};
}Notes:
- please know this i am a complete noob in nix and flakes, so updates and fixes will be appreciated! --CamRed25
Build and install manually for maximum control:
# Clone and build
git clone https://github.com/saltnpepper97/stasis
cd stasis
cargo build --release --locked
# Install system-wide
sudo install -Dm755 target/release/stasis /usr/local/bin/stasis
# Or install to user directory
install -Dm755 target/release/stasis ~/.local/bin/stasis-
Install Stasis using one of the methods above
-
Create your configuration at
~/.config/stasis/stasis.rune -
Check the wiki for detailed configuration examples
-
Start the daemon and enjoy intelligent idle management!
For configuration examples, CLI options, and advanced usage, visit the full documentation.
Stasis integrates with each compositor's native IPC protocol for optimal app detection and inhibition.
| Compositor | Support Status | Notes |
|---|---|---|
| Niri | โ Full Support | Tested and working perfectly |
| Hyprland | โ Full Support | Native IPC integration |
| labwc | Process-based fallback (details below) | |
| River | Process-based fallback (details below) | |
| Your Favorite | ๐ค PRs Welcome | Help us expand support! |
Both River and labwc have IPC protocol limitations that affect Stasis functionality:
- Limited window enumeration: These compositors don't provide complete window lists via IPC
- Fallback mode: Stasis uses process-based detection (sysinfo) for app inhibition
- Pattern adjustments: Executable names may differ from app IDsโcheck logs and adjust regex patterns accordingly
๐ก Tip: When using River or labwc, include both exact executable names and flexible regex patterns in your
inhibit_appsconfiguration. Enable verbose logging to see which apps are detected.
We welcome contributions! Adding support typically involves:
- Implementing the compositor's native IPC protocol
- Adding window/app detection functionality
- Testing with common applications
Check existing implementations in the codebase for reference, and don't hesitate to open an issue if you need guidance.
Stasis uses RUNEโa purpose-built configuration language that's both powerful and approachable.
Why RUNE?
- ๐ Human-readable: Clean syntax that makes sense at a glance
- ๐ข Variables: Define once, reference anywhere
- ๐ฏ Type-safe: Catch configuration errors before runtime
- ๐ฆ Nested blocks: Organize complex configurations naturally
- ๐ค Raw strings: Use
r"regex.*"for patterns without escaping hell - ๐ฌ Comments: Document your config with
# - ๐ท๏ธ Metadata: Add context with
@annotations
RUNE makes configuration feel less like programming and more like describing what you wantโbecause that's what a config should be.
Contributions make Stasis better for everyone! Here's how you can help:
- ๐ Report bugs โ Open an issue with reproduction steps
- ๐ก Suggest features โ Share your use cases and ideas
- ๐ง Submit PRs โ Fix bugs, add features, or improve code
- ๐ฆ Package for distros โ Make Stasis available to more users
- ๐ Improve docs โ Better explanations, examples, and guides
- ๐ฅ๏ธ Add compositor support โ Expand Wayland ecosystem compatibility
Released under the MIT License โ free to use, modify, and distribute.
Built with โค๏ธ for the Wayland community
Keeping your session in perfect balance between active and idle
