Integrate dmenu as a preloaded zero-lag DWM plugin (dmenu.so)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user