Integrate dmenu as a preloaded zero-lag DWM plugin (dmenu.so)

This commit is contained in:
Luxferre
2026-10-21 17:37:51 +03:00
parent 7da7352a6d
commit d240f25131
34 changed files with 2835 additions and 1232 deletions
+7 -1
View File
@@ -744,7 +744,13 @@ static int xdrawer_run_main(int argc, char** argv) {
writeIntFile(pidPath, static_cast<int>(::getpid()));
controller.refreshAll();
render();
runAsyncCmd("pkill -x dmenu >/dev/null 2>&1");
if (::access("/tmp/dwm_plugin_dmenu.active", F_OK) == 0) {
int dfd = ::open("/tmp/dwm_plugin_dmenu.fifo", O_WRONLY | O_NONBLOCK | O_CLOEXEC);
if (dfd >= 0) {
(void)::write(dfd, "CLOSE\n", 6);
::close(dfd);
}
}
};
auto hideWindow = [&](bool drainSoftkeys) {