Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Swayidle inhibitor when watching content or listening to audio

NotificationsYou must be signed in to change notification settings

ATTron/swaddle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swayidle inhibitor that automatically detects audio / video and will prevent your system from sleeping. No manual intervention needed!

Overview

The main function of this project is to keep any sway based WM from going into an idle state when consuming media. Swaddle will monitor the dbus running daemon and based on values it sees inPlayback Status will correctly cause idling or inhibition.

Dependencies

  • dirs: Config setup
  • config: Config building
  • dbus: Interfacing with the D-Bus.
  • env_logger: Better log handling
  • toml: For creating config file
  • serde: To serialize toml

Installation

Swaddle can be installed from the AUR:

paru -S swaddle

Building from source

  • Clone the repo and execute

    just build_release
  • You can move the binary into your$PATH or run directly

Debugging

To get some debugging logging from swaddle you can set the log level to debug and execute

just run_debug

Post-Install

To integrate swaddle with Sway/Hyprland, add the following line to your Sway/Hypr configuration:

  • Sway:
# Swaddle configurationexec_always --no-startup-id /usr/local/bin/swaddle &
  • Hyprland:
# Swaddle configurationexec = /usr/local/bin/swaddle &

Then reload your configuration or restart Sway/Hyprland.

Configuration File (Optional)

The first time swaddle is run it will create a config fileunder$HOME/.config/swaddle/config.toml.

You can also create / overwrite the config with the following options

NameValueExplainationDefault
debugbooleanshould swaddle be run in debug modetrue
servertableincludes the options to tweak how swaddle operates
server.inhibit_durationintegernumber of seconds to inhibit per cycle25
server.sleep_durationintegernumber of seconds to wait between cycles5

About

Swayidle inhibitor when watching content or listening to audio

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp