From 72dec2b9a86e78f16f14e7c19ec1d5c6bd0879e6 Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Sat, 18 Oct 2025 14:59:12 +0300 Subject: Update --- src/wayland.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/wayland.rs') 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> { 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))?; -- cgit v1.2.3-70-g09d2