mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-20 00:39:04 +03:00
Rearrange CLI subcommands a bit
This commit is contained in:
parent
36d3e70f11
commit
4dc7a6ceb8
20
src/cli.rs
20
src/cli.rs
@ -32,12 +32,6 @@ pub struct Cli {
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Sub {
|
||||
/// Validate the config file.
|
||||
Validate {
|
||||
/// Path to config file (default: `$XDG_CONFIG_HOME/niri/config.kdl`).
|
||||
#[arg(short, long)]
|
||||
config: Option<PathBuf>,
|
||||
},
|
||||
/// Communicate with the running niri instance.
|
||||
Msg {
|
||||
#[command(subcommand)]
|
||||
@ -46,16 +40,22 @@ pub enum Sub {
|
||||
#[arg(short, long)]
|
||||
json: bool,
|
||||
},
|
||||
/// Validate the config file.
|
||||
Validate {
|
||||
/// Path to config file (default: `$XDG_CONFIG_HOME/niri/config.kdl`).
|
||||
#[arg(short, long)]
|
||||
config: Option<PathBuf>,
|
||||
},
|
||||
/// Cause a panic to check if the backtraces are good.
|
||||
Panic,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Msg {
|
||||
/// Print the version of the running niri instance.
|
||||
Version,
|
||||
/// List connected outputs.
|
||||
Outputs,
|
||||
/// List workspaces.
|
||||
Workspaces,
|
||||
/// Print information about the focused window.
|
||||
FocusedWindow,
|
||||
/// Perform an action.
|
||||
@ -78,8 +78,8 @@ pub enum Msg {
|
||||
#[command(subcommand)]
|
||||
action: OutputAction,
|
||||
},
|
||||
/// List workspaces.
|
||||
Workspaces,
|
||||
/// Print the version of the running niri instance.
|
||||
Version,
|
||||
/// Request an error from the running niri instance.
|
||||
RequestError,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user