alex-courtis / xlayoutdisplay

Detects and arranges linux display outputs, using XRandR for detection and xrandr for arrangement.
Apache License 2.0
178 stars 15 forks source link

suggestion : don't change anything when run with no arguments #27

Closed fenugrec closed 1 year ago

fenugrec commented 1 year ago

I ran just xlayoutdisplay with no args expecting some usage info and general help, and it went ahead and messed up my config. Still haven't recovered yet, DPI is weird, half the applications don't scale well...

Suggest either modifying default behaviour to NOT do this, or at the very least, create a backup of current config... Or prompt user to press enter to continue with default behaviour (and an extra switch, e.g. -y or whatever, to skip prompt - if any args are given, unnecessary to prompt)

[EDIT - was able to restore most of my settings, but needed to restart X / reboot for full effect]

alex-courtis commented 1 year ago

Thanks for the suggestion. That would be more user friendly.

Unfortunately we can't do that now, as that would break most users, who simply call xlayoutdisplays in their .xinitrc

fenugrec commented 1 year ago

is there not a way to detect whether xlayoutdisplay is run from an interactive shell vs an init script ?

alex-courtis commented 1 year ago

is there not a way to detect whether xlayoutdisplay is run from an interactive shell vs an init script ?

That's a good suggestion, however that will break users who simply invoke xlayoutdisplay from the command line after, say, plugging in a monitor.