Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add man pages instead of only relying on help #39

Open
romangg opened this issue Dec 4, 2020 · 0 comments
Open

Add man pages instead of only relying on help #39

romangg opened this issue Dec 4, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request level::beginner stage::execute

Comments

@romangg
Copy link
Member

romangg commented Dec 4, 2020

In GitLab by @Kodehawa on Dec 4, 2020, 19:38

Disman for now relies heavily on --help arguments instead of man pages.
This would be okay if the help page was a little smaller, but the help feels more like a man page cramped into the help text.

Example for dismanctl:

Usage: dismanctl [options] [output.<name>.<setting> output.<name>.setting [...]]
dismanctl allows to change the screen setup from the command-line.

Setting the output configuration is done in an atomic fashion, all settings
are applied in a single command.
dismanctl can be used to enable and disable outputs, to position screens,
change resolution (mode setting), etc.. You should put all your options into 
a single invocation of dismanctl, so they can all be applied at once.

Usage examples:

Show output information:
$ dismanctl -o
Output: 1 eDP-1 enabled connected Panel Modes: Modes: 1:800x600@60 [...] Geometry: 0,0 1280x800
Output: 70 HDMI-2 enabled connected  HDMI Modes: 1:800x600@60 [...] Geometry: 1280,0 1920x1080

Disable the hdmi output, enable the laptop panel and set it to a specific mode
$ dismanctl output.HDMI-2.disable output.eDP-1.mode.1 output.eDP-1.enable

Position the hdmi monitor on the right of the laptop panel
$ dismanctl output.HDMI-2.position.0,1280 output.eDP-1.position.0,0

Set resolution mode
$ dismanctl output.HDMI-2.mode.1920x1080@60

Set scale (note: fractional scaling is only supported on wayland)
$ dismanctl output.HDMI-2.scale.2

Set rotation (possible values: none, left, right, inverted)
$ dismanctl output.HDMI-2.rotation.left


Options:
-h, --help           Displays help on commandline options.
--help-all           Displays help including Qt specific options.
-i, --info           Show runtime information: backends, logging, etc.
-j, --json           Show configuration in JSON format
-o, --outputs        Show outputs
-l, --log <comment>  Write a comment to the log file
-w, --watch          Watch for changes and print them to stdout.

Arguments:
config               Specific output settings are separated by spaces, each
setting is in the form of
output.<name>.<setting>[.<value>]
For example:
$ dismanctl output.HDMI-2.enable \
output.eDP-1.mode.4  \
output.eDP-1.position.1280,0
Multiple settings are passed in order to have dismanctl
apply these settings in one go.

This would be better of on a man page, and just provide the options on help, redirecting to disman(1) for anything more complex that would require in-depth explanation.

The proposal is mostly to fall in line with other unix programs which rely on man pages for this kind of information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request level::beginner stage::execute
Projects
None yet
Development

No branches or pull requests

1 participant