diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-10-18 14:59:12 +0300 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-10-18 14:59:12 +0300 |
| commit | 72dec2b9a86e78f16f14e7c19ec1d5c6bd0879e6 (patch) | |
| tree | 421a1c0c725a2bbd00b92cc5f8da7158228e9b62 /src/wayland.rs | |
| parent | 0396d313791af347f31d004bbf2842fb11244fac (diff) | |
| download | wallpaper-72dec2b9a86e78f16f14e7c19ec1d5c6bd0879e6.tar.zst | |
Update
Diffstat (limited to '')
| -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))?; |
