| Crates.io | partymode |
| lib.rs | partymode |
| version | 0.2.1 |
| created_at | 2025-05-07 00:34:20.751644+00 |
| updated_at | 2025-05-07 00:51:27.996496+00 |
| description | Keeps your system awake while playing media |
| homepage | |
| repository | https://github.com/peppidesu/partymode |
| max_upload_size | |
| id | 1663170 |
| size | 84,190 |
Prevents your system from idling/suspending while media is being played.
dbussystemdcargo install partymode
partymode [OPTIONS] <COMMAND>
Commands:
daemon Run the partymode daemon
on Enable party mode
off Disable party mode
toggle Toggle party mode
status Show the current status
help Print this message or the help of the given subcommand(s)
Options:
-c, --config <PATH> Provide a custom location for the config file
-v, --verbose Enable verbose logging
-h, --help Print help
-V, --version Print version
To manage the partymode daemon with systemd, you can create this user service:
[Unit]
After=dbus-broker.service
Description="partymode - Keep your system awake while playing media"
Documentation="https://github.com/peppidesu/partymode"
[Service]
Type=simple
ExecStart=/path/to/partymode daemon # change this
Restart=on-failure
[Install]
WantedBy=default.target
partymode will create the following config at ~/.config/partymode/config.toml (or the directory specified with -c) if it doesn't exist:
default-enabled = true
poll-interval = 5000
["*"]
always = false
mode = "block"
targets = ["idle"]
default-enabledWhether to enable partymode on startup or not.
poll-intervalHow often to check for player changes, in ms.
Rules allow you to specify inhibit behavior on a per-application basis. A rule looks like this:
[name]
always = false
mode = "<mode>"
targets = []
alwaysWhen true, inhibit regardless of whether partymode is enabled or not.
modeInhibit mode as specified by systemd-inhibit(1).
targetsWhat to inhibit. Can be one of "idle", "suspend" or "shutdown".
partymode will use the last part of the MPRIS bus name (org.mpris.MediaPlayer2.<name>) to match against config rules. You can get a list of these with playerctl:
playerctl -l
If parts of a rule are omitted or no matching rule is found, partymode resorts to using the default rule (["*"]).
Feel free to report issues and PR :)