Skip to content

Commit

Permalink
hyprland: prefer the new socket path
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxVerevkin committed May 6, 2024
1 parent 2d6268b commit 0f67a9a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/wm_info_provider/hyprland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 0f67a9a

Please sign in to comment.