Add preloaded SMS, File Manager, and Camera (live viewfinder) DWM plugins

This commit is contained in:
Luxferre
2026-10-21 14:46:11 +03:00
parent c1e5c646d6
commit 55b20c5b85
45 changed files with 4767 additions and 126 deletions
+9 -18
View File
@@ -692,15 +692,7 @@ int runContactsApp(int argc, char** argv) {
};
auto showWindow = [&](const std::string& arg) {
if (isPidFileAlive(getRuntimeFile("xdialer.pid"))) {
sendPluginCommand("dialer", "CLOSE");
}
if (isPidFileAlive(getRuntimeFile("xcalllog.pid"))) {
sendPluginCommand("calllog", "CLOSE");
}
if (isPidFileAlive(getRuntimeFile("xdrawer.pid"))) {
sendPluginCommand("xdrawer", "CLOSE");
}
closeOtherPlugins("contacts");
bool openNewMode = (arg.rfind("new:", 0) == 0);
std::string prefill = openNewMode ? arg.substr(4) : "";
@@ -844,13 +836,17 @@ int runContactsApp(int argc, char** argv) {
break;
case 1: // Send SMS
writeSoftkeySuppress(nowMs() + 350);
hideWindow(true);
runAsyncCmd("sxmo_modemtext.sh sendtextmenu '" + c.number + "'");
hideWindow(false);
if (!sendPluginCommand("sms", "OPEN send:" + c.number)) {
runAsyncArgv("xsms", "sendtextmenu", c.number.c_str());
}
break;
case 2: // Read Messages
writeSoftkeySuppress(nowMs() + 350);
hideWindow(true);
runAsyncCmd("sxmo_hook_tailtextlog.sh '" + c.number + "'");
hideWindow(false);
if (!sendPluginCommand("sms", "OPEN thread:" + c.number)) {
runAsyncArgv("xsms", "tailtextlog", c.number.c_str());
}
break;
case 3: // Open in Dialer
writeSoftkeySuppress(nowMs() + 300);
@@ -961,11 +957,6 @@ int runContactsApp(int argc, char** argv) {
if (ev.xexpose.count == 0) {
render();
}
} else if (ev.type == VisibilityNotify) {
if (ev.xvisibility.state != VisibilityUnobscured) {
XRaiseWindow(dpy, win);
XFlush(dpy);
}
} else if (ev.type == KeyRelease) {
KeySym sym = XLookupKeysym(&ev.xkey, 0);
if (ev.xkey.keycode == 19 || sym == XK_0) {