diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2024-05-06 19:55:59 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2024-05-06 19:55:59 +0300 |
| commit | 0f67a9aebee45baf9256915975d82b20a84b8a50 (patch) | |
| tree | 91801f01d00707a4213ed1082ad322904945c2bb /src/wm_info_provider | |
| parent | 2d6268ba72bc27ee35a05821775cfb6166596951 (diff) | |
| download | i3bar-mango-0f67a9aebee45baf9256915975d82b20a84b8a50.tar.gz | |
hyprland: prefer the new socket path
Diffstat (limited to 'src/wm_info_provider')
| -rw-r--r-- | src/wm_info_provider/hyprland.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wm_info_provider/hyprland.rs b/src/wm_info_provider/hyprland.rs index d1ab42c..bbef98b 100644 --- a/src/wm_info_provider/hyprland.rs +++ b/src/wm_info_provider/hyprland.rs @@ -108,11 +108,10 @@ struct Ipc { impl Ipc { fn new(his: &str) -> Option<Self> { - let mut path = PathBuf::from("/tmp/hypr"); + let mut path = PathBuf::from(std::env::var("XDG_RUNTIME_DIR").ok()?); + path.push("hypr"); if !path.exists() { - let xdgrd = std::env::var("XDG_RUNTIME_DIR").ok()?; - path.push(xdgrd); - path.push("hypr"); + path.push("/tmp/hypr"); } path.push(his); let sock1_path = path.join(".socket.sock"); |
