grobi
grobi copied to clipboard
more config options
This looks pretty nice on my quick look. I'd love to have --dpi, --rotate, --scale and --pos support also. I'll see if I can make some time to implement, but if you want to beat me to it by all means ;).
Thanks for your contribution! I'd be easy to implement this, I'm just not sure how to add the options to the config file without making it cluttered and unusable... do you have an idea/proposal?
On a similar topic: I'd like to refactor the config file and switch from YAML (which is hard to use if you don't know it already) to something easier, e.g. HCL.
good news for me then! Yeah I saw the HCL issue. I can't really think of a way around have a messyish (to whom though) config.
I've only interacted with HCL via terraform not sure if generic hcl is in the exact same format, but
configuration "docked" {
exists: {
HDMI1
HDMI2
}
config {
HDMI1 {
right-of: HDMI2
}
HDMI2 {
above: eDP1
}
eDP1 {
primary: true
above: eDP1
}
global {
dpi: 192
}
}
}
seems verbose, but I kind of prefer explicitness over magicness :/
So, I've abandoned the idea to use HCL, and we'll just stick with YAML. Are you still interested in adding options?
I second this proposal. Especially the --rotate option is a must-have for me, since I use one 90 degrees turned screen for code.
We already have options for resolution like these:
configure_row:
- LVDS1
- VGA1@1024x768
Maybe the format could be extended to something like
configure_row:
LVDS1:
resolution: 1024x768
orientation: left
primary: true
VGA1:
resolution: 1920x1080
Hm, I wonder if implementing that keeps the code readable. I'd accept a PR if you're up for it :)
Program code or config file? One could also simply allow verbatim xrandr options, like
configure_row:
- LVDS1: "--scale 1.2x1.2"
- VGA1@1920x1080
Alternatively, one could give an argument list, like ["--scale", "1.2x1.2"].
Of course, it's unsafe as you wouldn't check compatibility of options (or you have to parse the args).