mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-31 14:33:29 +02:00
fix(ahk): quote app ids in generated code
Previously, generated AHK did not surround with quotes inputs which could contain spaces such as application titles. This commit ensures that in any generated AHK code where an application id is passed to a komorebic.exe command as input, that input will always be quoted. This fixes bugs related to float rules, manage rules and other application identification commands not being properly executed via komorebic called from the generated AHK files when the app id contained a space.
This commit is contained in:
@@ -27,24 +27,30 @@ impl ApplicationOptions {
|
||||
match self {
|
||||
ApplicationOptions::ObjectNameChange => {
|
||||
format!(
|
||||
"komorebic.exe identify-object-name-change-application {} {}",
|
||||
"komorebic.exe identify-object-name-change-application {} \"{}\"",
|
||||
kind, id
|
||||
)
|
||||
}
|
||||
ApplicationOptions::Layered => {
|
||||
format!("komorebic.exe identify-layered-application {} {}", kind, id)
|
||||
format!(
|
||||
"komorebic.exe identify-layered-application {} \"{}\"",
|
||||
kind, id
|
||||
)
|
||||
}
|
||||
ApplicationOptions::BorderOverflow => {
|
||||
format!(
|
||||
"komorebic.exe identify-border-overflow-application {} {}",
|
||||
"komorebic.exe identify-border-overflow-application {} \"{}\"",
|
||||
kind, id
|
||||
)
|
||||
}
|
||||
ApplicationOptions::TrayAndMultiWindow => {
|
||||
format!("komorebic.exe identify-tray-application {} {}", kind, id)
|
||||
format!(
|
||||
"komorebic.exe identify-tray-application {} \"{}\"",
|
||||
kind, id
|
||||
)
|
||||
}
|
||||
ApplicationOptions::Force => {
|
||||
format!("komorebic.exe manage-rule {} {}", kind, id)
|
||||
format!("komorebic.exe manage-rule {} \"{}\"", kind, id)
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -145,7 +151,7 @@ impl ApplicationConfigurationGenerator {
|
||||
if let Some(float_identifiers) = app.float_identifiers {
|
||||
for float in float_identifiers {
|
||||
let float_rule = format!(
|
||||
"Run, komorebic.exe float-rule {} {}, , Hide",
|
||||
"Run, komorebic.exe float-rule {} \"{}\", , Hide",
|
||||
float.kind, float.id
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user