Fix sxmo_power.sh polkit multi-session auth and dmenu PATH

This commit is contained in:
Luxferre
2026-10-21 17:59:11 +03:00
parent d240f25131
commit 1ee112561c
4 changed files with 62 additions and 32 deletions
+11 -4
View File
@@ -2290,8 +2290,7 @@ process_x11_events(void)
return;
}
if (ev.type == KeyRelease) {
if (query_trigger_keys_down() == 0)
initial_released = 1;
initial_released = 1;
continue;
}
if (!initial_released || now < start_ignore)
@@ -2308,8 +2307,7 @@ process_x11_events(void)
}
if (is_enter) {
if (ev.type == KeyRelease) {
if (query_trigger_keys_down() == 0)
initial_released = 1;
initial_released = 1;
continue;
}
if (!initial_released || dmenu_now_ms() < start_ignore)
@@ -2713,6 +2711,15 @@ dmenu_run_main(int argc, char *argv[])
if (getenv("DMENU_WRAP_AROUND"))
wrap_around = 1;
const char *cur_path = getenv("PATH");
if (!cur_path || !strstr(cur_path, "/home/user/.local/bin")) {
char new_path[1024];
snprintf(new_path, sizeof(new_path),
"/home/user/.config/sxmo/hooks:/home/user/.local/bin:/usr/share/sxmo/default_hooks:%s",
(cur_path && cur_path[0]) ? cur_path : "/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin");
setenv("PATH", new_path, 1);
}
int lock_fd = -1;
int fifo_fd = -1;
int sock_fd = -1;