diff options
Diffstat (limited to 'src/wayland.rs')
| -rw-r--r-- | src/wayland.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/wayland.rs b/src/wayland.rs index afb1486..f9c396d 100644 --- a/src/wayland.rs +++ b/src/wayland.rs @@ -29,12 +29,11 @@ pub fn configure_hyprland_window( // For Hyprland, we can use hyprctl to configure the window // This requires the window to be created first, so we'll do this after creation - if let Ok(output) = Command::new("which").arg("hyprctl").output() { - if output.status.success() { + if let Ok(output) = Command::new("which").arg("hyprctl").output() + && output.status.success() { info!("Hyprland detected, will configure window properties"); // We'll configure the window after it's mapped in the event loop } - } Ok(()) } @@ -70,7 +69,7 @@ pub fn apply_hyprland_rules(window_id: u64, config: &HyprlandConfig) -> Result<( let window_selector = format!("address:0x{:x}", window_id); let output = Command::new("hyprctl") - .args(&[ + .args([ "keyword", "windowrule", &format!("{},{}", rules_str, window_selector), @@ -91,7 +90,7 @@ pub fn apply_hyprland_rules(window_id: u64, config: &HyprlandConfig) -> Result<( // Also try to move it to the background layer let workspace = format!("special:background,{}", window_selector); let output = Command::new("hyprctl") - .args(&["dispatch", "movetoworkspace", &workspace]) + .args(["dispatch", "movetoworkspace", &workspace]) .output() .map_err(|e| anyhow!("Failed to move window to background: {}", e))?; @@ -111,7 +110,7 @@ pub fn get_output_info() -> Result<Vec<OutputInfo>> { use std::process::Command; let output = Command::new("hyprctl") - .args(&["monitors", "-j"]) + .args(["monitors", "-j"]) .output() .map_err(|e| anyhow!("Failed to execute hyprctl: {}", e))?; |
