From d8719a3c19849f5f1b119a64824a40df0d740b6d Mon Sep 17 00:00:00 2001 From: innocentzero Date: Fri, 29 Mar 2024 07:48:49 +0530 Subject: [PATCH] [fix] keymaps not sent to swhks socket The commit 5e8ebe3 introduced a regression where keymaps were not sent to swhks because of an invalid path. Signed-off-by: innocentzero --- swhkd/src/environ.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);