diff --git a/swhkd/src/environ.rs b/swhkd/src/environ.rs index 1cb1bae..3d2e9c6 100644 --- a/swhkd/src/environ.rs +++ b/swhkd/src/environ.rs @@ -93,8 +93,8 @@ impl Env { Ok(val) => PathBuf::from(val), Err(e) => match e { EnvError::XdgRuntimeNotFound => { - log::warn!("XDG_RUNTIME_DIR not found, using hardcoded /run/swhkd"); - PathBuf::from("/run/swhkd") + log::warn!("XDG_RUNTIME_DIR not found, using hardcoded /run/user"); + PathBuf::from(format!("/run/user/{}", pkexec_id)) } _ => { eprintln!("Failed to get XDG_RUNTIME_DIR: {:?}", e);