Add preloaded SMS, File Manager, and Camera (live viewfinder) DWM plugins
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user