Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

razor-panel: changes to command line arguments #410

Closed
jleclanche opened this Issue · 16 comments

3 participants

@jleclanche
Collaborator

Currently, the model is razor-panel [<file.conf>].

This should be changed to razor-panel [--config </path/to/file.conf>], and for the positional argument to be removed.

Additionally, it would be interesting to be able to run something like --desktop=<desktop> --alignment=<alignment>. This would allow initially creating a panel at a certain position, instead of having it always at the bottom of desktop 1. When we add a gui for running multiple panels, this will definitely come in handy.

@mckaygerhard

the right label missing here are feature request, lease udate it!

@SokoloffA
Owner

I agree about --desktop and --alignment. But int the "razor-pane new-panel" the he-panel isn't config path is a panel name, so I think it should be a argument not option. Another reason to leave this argument, it is a compatibility, some guys have a scripts and we'll breake this scripts.

@jleclanche
Collaborator

That makes more sense. --config could still be added though in that case, it'd just be optional for additional panels.

As for compatibility, I really don't think it's something we have to worry about while we're in 0.x. It's there for a reason, imho.

@mckaygerhard
@SokoloffA
Owner
@mckaygerhard
@jleclanche
Collaborator

I'm not sure what the issue is here. FWIW, if the argument is a name we should NOT accept a .conf extension for it. So either it's razor-panel [name] or razor-panel [--config=path].

@mckaygerhard
@jleclanche
Collaborator

Why can't you contribute to a bug without bringing up windows hate?
This isn't even about extensions, it's about the difference between names and file paths. If it's a panel name, it doesn't have an extension. If it's a file path, it does. We shouldn't bring in magic when we don't need to.

@mckaygerhard
@SokoloffA
Owner

Guys I'm tired of words.
@Adys
Can you write help text?

Usage: razor-panel [options]

Desktop Independent panel component from Razor-qt desktop.

Options:
  -h, --help                Show help about options
  --config CONFIGNAME       ???
  --desktop DESKTOPNUM      ???
  --alignment ALIGNMENT     ??? 
  something else

and I'll write the code

@jleclanche
Collaborator
NAME
razor-panel — Standalone desktop panel with separate plugins. Part of the Razor-qt desktop.

SYNOPSIS
razor-panel [--config=PATH] [--desktop=DESKTOP] [--alignment=ALIGNMENT]

OPTIONS
-h,  --help               Display this help and exits
--config=PATH             Uses the configuration file located at PATH. Useful for running more than one panel.
--desktop=DESKTOP         Displays the panel on a specific desktop. DESKTOP is the id of the desktop the panel should be displayed on. Defaults to 1.
--alignment=ALIGNMENT     Aligns the panel to a specific side of the desktop. ALIGNMENT can be one of bottom, top, left or right. Defaults to right.

NOTES
The --desktop and --alignment options override the values specified in the configuration file. They will be saved to the configuration file only if they didn't exist before.
@jleclanche
Collaborator

That was the man page.
Help text:

Usage: 
 razor-panel [--config=PATH] [--desktop=DESKTOP] [--alignment=ALIGNMENT]

Options:
-h,  --help               Display this help and exits
--config=PATH             Uses the configuration file located at PATH.
--desktop=DESKTOP         Displays the panel on a specific desktop. DESKTOP is the id of the desktop the panel should be displayed on.
--alignment=ALIGNMENT     Aligns the panel to a specific side of the desktop. ALIGNMENT can be one of bottom, top, left or right.

For more details, see razor-panel(1).
@SokoloffA
Owner

Maybe so?
--config=CFG_NAME Uses the configuration file named NAME. Useful for running more than one panel.

@jleclanche
Collaborator

If we stick to NAME, we should keep the current design of razor-panel [NAME], imho. --config is a pretty standard flag and it always takes a full config path.

@jleclanche
Collaborator

Closing, as per discussion with Petr.

@jleclanche jleclanche closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.