grobi icon indicating copy to clipboard operation
grobi copied to clipboard

more config options

Open mmlb opened this issue 9 years ago • 6 comments
trafficstars

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 ;).

mmlb avatar Mar 30 '16 01:03 mmlb

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.

fd0 avatar Mar 30 '16 06:03 fd0

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 :/

mmlb avatar Mar 30 '16 14:03 mmlb

So, I've abandoned the idea to use HCL, and we'll just stick with YAML. Are you still interested in adding options?

fd0 avatar Aug 01 '20 11:08 fd0

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
         

pinpox avatar Oct 22 '20 22:10 pinpox

Hm, I wonder if implementing that keeps the code readable. I'd accept a PR if you're up for it :)

fd0 avatar Oct 30 '20 07:10 fd0

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).

jorsn avatar Nov 12 '21 11:11 jorsn