forge
Explore
Log in

Don't you dare go Hollow

Rearrange CLI subcommands a bit

Browse files at this commit

4dc7a6ceb80dfa8ac04ee9ca44a599405493f6cbIvan MolodetskikhParent: 36d3e70
src/cli.rsmodified+10 -10
@@ -32,12 +32,6 @@ pub struct Cli {
32 32
33 #[derive(Subcommand)]33 #[derive(Subcommand)]
34 pub enum Sub {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 /// Communicate with the running niri instance.35 /// Communicate with the running niri instance.
42 Msg {36 Msg {
43 #[command(subcommand)]37 #[command(subcommand)]
@@ -46,16 +40,22 @@ pub enum Sub {
46 #[arg(short, long)]40 #[arg(short, long)]
47 json: bool,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 /// Cause a panic to check if the backtraces are good.49 /// Cause a panic to check if the backtraces are good.
50 Panic,50 Panic,
51 }51 }
52 52
53 #[derive(Subcommand)]53 #[derive(Subcommand)]
54 pub enum Msg {54 pub enum Msg {
55- /// Print the version of the running niri instance.
56- Version,
57 /// List connected outputs.55 /// List connected outputs.
58 Outputs,56 Outputs,
57+ /// List workspaces.
58+ Workspaces,
59 /// Print information about the focused window.59 /// Print information about the focused window.
60 FocusedWindow,60 FocusedWindow,
61 /// Perform an action.61 /// Perform an action.
@@ -78,8 +78,8 @@ pub enum Msg {
78 #[command(subcommand)]78 #[command(subcommand)]
79 action: OutputAction,79 action: OutputAction,
80 },80 },
81- /// List workspaces.81+ /// Print the version of the running niri instance.
82- Workspaces,82+ Version,
83 /// Request an error from the running niri instance.83 /// Request an error from the running niri instance.
84 RequestError,84 RequestError,
85 }85 }