feat(shortcuts): add helper written in egui

This commit is contained in:
LGUG2Z
2025-05-04 12:41:47 -07:00
parent ee89b344df
commit 228e03efd8
13 changed files with 256 additions and 15 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ shadow-rs = { workspace = true }
[features]
default = ["schemars"]
schemars = ["dep:schemars"]
schemars = ["dep:schemars", "komorebi-client/schemars"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(FALSE)'] }
+11
View File
@@ -1003,6 +1003,8 @@ enum SubCommand {
GlobalState,
/// Launch the komorebi-gui debugging tool
Gui,
/// Toggle the komorebi-shortcuts helper
ToggleShortcuts,
/// Show a JSON representation of visible windows
VisibleWindows,
/// Show information about connected monitors
@@ -2713,6 +2715,15 @@ if (Get-Command Get-CimInstance -ErrorAction SilentlyContinue) {
SubCommand::Gui => {
Command::new("komorebi-gui").spawn()?;
}
SubCommand::ToggleShortcuts => {
let output = Command::new("taskkill")
.args(["/F", "/IM", "komorebi-shortcuts.exe"])
.output()?;
if !output.status.success() {
Command::new("komorebi-shortcuts.exe").spawn()?;
}
}
SubCommand::VisibleWindows => {
print_query(&SocketMessage::VisibleWindows);
}