Skip to content

CamRed25/stasis

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Stasis Logo

Stasis

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

GitHub last commit AUR version MIT License Wayland Rust

Features โ€ข Installation โ€ข Quick Start โ€ข Compositor Support โ€ข Contributing


โœจ Features

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

๐Ÿ—บ๏ธ Roadmap

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.

Complete

  • 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-screen action 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.

In Progress

  • User profiles / presets โ€“ save and load different workflows for various scenarios (work, gaming, etc.).

Planned

  • 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.

๐Ÿ“ฆ Installation

Arch Linux (AUR)

Install the stable release or latest development version:

# Stable release
yay -S stasis

# Or latest git version
yay -S stasis-git

Works with paru too:

paru -S stasis

NixOS

please 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 stasis as an input in your own flake.nix and 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

From Source

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

๐Ÿš€ Quick Start

  1. Install Stasis using one of the methods above

  2. Create your configuration at ~/.config/stasis/stasis.rune

  3. Check the wiki for detailed configuration examples

  4. Start the daemon and enjoy intelligent idle management!

For configuration examples, CLI options, and advanced usage, visit the full documentation.

Compositor Support

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 โš ๏ธ Limited Process-based fallback (details below)
River โš ๏ธ Limited Process-based fallback (details below)
Your Favorite ๐Ÿค PRs Welcome Help us expand support!

๐Ÿ“Œ River & labwc Compatibility Notes

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_apps configuration. Enable verbose logging to see which apps are detected.

Want to Add Compositor Support?

We welcome contributions! Adding support typically involves:

  1. Implementing the compositor's native IPC protocol
  2. Adding window/app detection functionality
  3. Testing with common applications

Check existing implementations in the codebase for reference, and don't hesitate to open an issue if you need guidance.

๐Ÿ”ง About RUNE Configuration

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.

๐Ÿค Contributing

Contributions make Stasis better for everyone! Here's how you can help:

Ways to Contribute

  • ๐Ÿ› 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

๐Ÿ“„ License

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

About

Modern Idle Manager For Wayland

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.8%
  • Nix 1.2%