summaryrefslogtreecommitdiff
path: root/src/wm_info_provider
diff options
context:
space:
mode:
Diffstat (limited to 'src/wm_info_provider')
-rw-r--r--src/wm_info_provider/hyprland.rs7
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");