https://github.com/daniloqueiroz/monitorctl
Monitorctl is a tool to manage bspwm/xrandr monitors profiles
https://github.com/daniloqueiroz/monitorctl
Last synced: 8 months ago
JSON representation
Monitorctl is a tool to manage bspwm/xrandr monitors profiles
- Host: GitHub
- URL: https://github.com/daniloqueiroz/monitorctl
- Owner: daniloqueiroz
- Created: 2023-01-29T18:23:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-17T17:37:29.000Z (about 3 years ago)
- Last Synced: 2025-06-03T21:17:12.304Z (about 1 year ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
**Monitorctl** is the missing piece for switching monitor configurations
for [bspwm](https://github.com/baskerville/bspwm).
Monitorctl allows you to define profiles with different outputs, define the `xrandr`
config for each output, as well what `bspwm` desktops should be assigned to each output.
It also allows you to run a custom script whenever a profile is applied.
# How it works
When switching profiles, `monitorctl` will create a new `bspwm` virtual desktop,
move the existing desktops to the virtual desktop, remove the existing monitors from
`bpswm`, turn off the `xrandr` outputs and then reconfigure all outputs defines on the
profile. As the desktops aren't modified, it will keep all the windows on the same
desktops as before.
# Usage
The easiest way to get start is by defining your profiles and then run
`monitorctl --config apply-auto` to auto-detect
a profile and apply it.
For other options, use `monitorctl --help`.
## Example config
```yaml
# execute the command below when a profile is loaded
# optional field
on_profile_load_cmd: launch_polybar.sh
profiles:
# profiles entries format
# :
# - output: # mandatory
# desktop: # mandatory
# resolution: # optional, default: auto
# rotation: # optional, default: normal
# : # optional, default: None
single:
- output: HDMI1
desktops: [1, 2, 3, 4, 5, 6, 6, 7, 0]
resolution: 3440x1440
dual:
- output: HDMI1
desktops: [5, 6, 7, 8, 9, 0]
resolution: 3440x1440
- output: HDMI2
desktops: [1, 2, 3, 4]
resolution: auto
left_of: HDMI1
rotation: left
```