jsen- / monitor-switch

switch monitor configuration and default pulseaudio sink

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

monitor-switch

allows you to switch between multiple screen & audio output profiles with single keystroke

Installation

either download a pre-build binary from project releases or build manually:

cargo install -Z "build-std=std,panic_abort" -Z "build-std-features=panic_immediate_abort" --target "x86_64-unknown-linux-gnu" --path .

Configuration

${XDG_CONFIG_HOME:-${HOME}/.config}/monitor-switch/config.toml

[profile."work"]
pulseaudio-sink = "alsa_output.usb-SteelSeries_Arctis_Pro_Wireless-00.iec958-stereo"
monitors ="""
<monitors version="2">
[...]
</monitors>"""

[profile."movie"]
pulseaudio-sink = "alsa_output.pci-0000_03_00.1.hdmi-stereo"
monitors ="""
<monitors version="2">
[...]
</monitors>"""

[profile."disco"]
...

full example of config.toml

State file

${XDG_CACHE_HOME:-${HOME}/.cache}/monitor-switch/state{,.tmp}

just fyi, feel free to ignore those

Usage

monitor-switch

Will read the last applied profile from state file and apply the next profile defined in config. If current profile cannot be determined the first profile will be applied.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

switch monitor configuration and default pulseaudio sink

License:Apache License 2.0


Languages

Language:Rust 100.0%