Rearrange CLI subcommands a bit
Browse files at this commit4dc7a6ceb80dfa8ac04ee9ca44a599405493f6cbParent: 36d3e701 changed file +10 -10
- src/cli.rs +10 -10
src/cli.rsmodified+10 -10
| @@ -32,12 +32,6 @@ pub struct Cli { | ||
| 32 | 32 | |
| 33 | 33 | #[derive(Subcommand)] |
| 34 | 34 | pub enum Sub { |
| 35 | - /// Validate the config file. | |
| 36 | - Validate { | |
| 37 | - /// Path to config file (default: `$XDG_CONFIG_HOME/niri/config.kdl`). | |
| 38 | - #[arg(short, long)] | |
| 39 | - config: Option<PathBuf>, | |
| 40 | - }, | |
| 41 | 35 | /// Communicate with the running niri instance. |
| 42 | 36 | Msg { |
| 43 | 37 | #[command(subcommand)] |
| @@ -46,16 +40,22 @@ pub enum Sub { | ||
| 46 | 40 | #[arg(short, long)] |
| 47 | 41 | json: bool, |
| 48 | 42 | }, |
| 43 | + /// Validate the config file. | |
| 44 | + Validate { | |
| 45 | + /// Path to config file (default: `$XDG_CONFIG_HOME/niri/config.kdl`). | |
| 46 | + #[arg(short, long)] | |
| 47 | + config: Option<PathBuf>, | |
| 48 | + }, | |
| 49 | 49 | /// Cause a panic to check if the backtraces are good. |
| 50 | 50 | Panic, |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | #[derive(Subcommand)] |
| 54 | 54 | pub enum Msg { |
| 55 | - /// Print the version of the running niri instance. | |
| 56 | - Version, | |
| 57 | 55 | /// List connected outputs. |
| 58 | 56 | Outputs, |
| 57 | + /// List workspaces. | |
| 58 | + Workspaces, | |
| 59 | 59 | /// Print information about the focused window. |
| 60 | 60 | FocusedWindow, |
| 61 | 61 | /// Perform an action. |
| @@ -78,8 +78,8 @@ pub enum Msg { | ||
| 78 | 78 | #[command(subcommand)] |
| 79 | 79 | action: OutputAction, |
| 80 | 80 | }, |
| 81 | - /// List workspaces. | |
| 82 | - Workspaces, | |
| 81 | + /// Print the version of the running niri instance. | |
| 82 | + Version, | |
| 83 | 83 | /// Request an error from the running niri instance. |
| 84 | 84 | RequestError, |
| 85 | 85 | } |