@@ -17,11 +17,25 @@ struct Cli { |
| 17 | 17 | #[derive(Subcommand)] |
| 18 | 18 | enum Commands { |
| 19 | 19 | /// Show the quick settings panel |
| 20 | | - Show, |
| 20 | + Show { |
| 21 | + /// X position for panel |
| 22 | + #[arg(default_value = "0")] |
| 23 | + x: i32, |
| 24 | + /// Y position for panel |
| 25 | + #[arg(default_value = "0")] |
| 26 | + y: i32, |
| 27 | + }, |
| 21 | 28 | /// Hide the quick settings panel |
| 22 | 29 | Hide, |
| 23 | 30 | /// Toggle quick settings panel visibility |
| 24 | | - Toggle, |
| 31 | + Toggle { |
| 32 | + /// X position for panel |
| 33 | + #[arg(default_value = "0")] |
| 34 | + x: i32, |
| 35 | + /// Y position for panel |
| 36 | + #[arg(default_value = "0")] |
| 37 | + y: i32, |
| 38 | + }, |
| 25 | 39 | /// Reload configuration |
| 26 | 40 | Reload, |
| 27 | 41 | /// Get daemon status |
@@ -33,14 +47,14 @@ enum Commands { |
| 33 | 47 | fn main() -> Result<()> { |
| 34 | 48 | let cli = Cli::parse(); |
| 35 | 49 | |
| 36 | | - let command = match cli.command { |
| 37 | | - Commands::Show => "show", |
| 38 | | - Commands::Hide => "hide", |
| 39 | | - Commands::Toggle => "toggle", |
| 40 | | - Commands::Reload => "reload", |
| 41 | | - Commands::Status => "status", |
| 42 | | - Commands::Quit => "quit", |
| 50 | + let cmd = match cli.command { |
| 51 | + Commands::Show { x, y } => ipc::Command::Show { x, y }, |
| 52 | + Commands::Hide => ipc::Command::Hide, |
| 53 | + Commands::Toggle { x, y } => ipc::Command::Toggle { x, y }, |
| 54 | + Commands::Reload => ipc::Command::Reload, |
| 55 | + Commands::Status => ipc::Command::Status, |
| 56 | + Commands::Quit => ipc::Command::Quit, |
| 43 | 57 | }; |
| 44 | 58 | |
| 45 | | - ipc::send_command(command) |
| 59 | + ipc::send_command(cmd) |
| 46 | 60 | } |