Add modem/networks DWM plugins, Dual-SIM & PIN/PUK support, built-in dmenu views, and game UX fixes
This commit is contained in:
1 parent
668a4da11d
commit
e549aaf413
63 files changed
+4781
-426
No files matched your search
@@ -78,6 +78,17 @@ constexpr const char* kIconSoundOff = "\xef\x91\xa6"; // U+F466 mute
|
||||
constexpr const char* kIconMicOn = "\xf3\xb0\x8d\xac"; // U+F036C mic on
|
||||
constexpr const char* kIconMicOff = "\xf3\xb0\x8d\xad"; // U+F036D mic off
|
||||
constexpr const char* kIconRecord = "\xef\x84\x91"; // U+F111 circle / record dot
|
||||
constexpr const char* kIconLock = "\xef\x80\xa3"; // U+F023 lock
|
||||
constexpr const char* kIconUnlock = "\xef\x82\x9c"; // U+F09C unlock
|
||||
constexpr const char* kIconSignal = "\xef\x80\x92"; // U+F012 signal bars
|
||||
constexpr const char* kIconWifi = "\xef\x87\xab"; // U+F1EB wifi
|
||||
constexpr const char* kIconBluetooth = "\xef\x8a\x94"; // U+F294 bluetooth
|
||||
constexpr const char* kIconGlobe = "\xef\x82\xac"; // U+F0AC globe / network
|
||||
constexpr const char* kIconSliders = "\xef\x87\x9e"; // U+F1DE sliders / config
|
||||
constexpr const char* kIconToggleOn = "\xef\x88\x85"; // U+F205 toggle on
|
||||
constexpr const char* kIconToggleOff = "\xef\x88\x84"; // U+F204 toggle off
|
||||
constexpr const char* kIconKey = "\xef\x82\x84"; // U+F084 key / PIN
|
||||
constexpr const char* kIconSim = "\xef\x9f\x84"; // U+F7C4 sim card / chip
|
||||
|
||||
inline int64_t nowMs() {
|
||||
struct timespec ts {};
|
||||
@@ -333,6 +344,26 @@ inline void runAsyncCmd(const std::string& cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
inline std::string runCaptureCmd(const std::string& cmd, int* exitCodeOut = nullptr) {
|
||||
FILE* fp = ::popen(cmd.c_str(), "r");
|
||||
if (!fp) {
|
||||
if (exitCodeOut) {
|
||||
*exitCodeOut = -1;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
std::string out;
|
||||
char buf[512];
|
||||
while (std::fgets(buf, sizeof(buf), fp) != nullptr) {
|
||||
out += buf;
|
||||
}
|
||||
int status = ::pclose(fp);
|
||||
if (exitCodeOut) {
|
||||
*exitCodeOut = status;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
inline void runAsyncArgv(const char* prog,
|
||||
const char* arg1 = nullptr,
|
||||
const char* arg2 = nullptr,
|
||||
@@ -1013,6 +1044,8 @@ inline void closeOtherPlugins(const char* selfPluginName) {
|
||||
{"xfiles.pid", "files"},
|
||||
{"xcamera.pid", "camera"},
|
||||
{"xthemes.pid", "themes"},
|
||||
{"xmodem.pid", "modem"},
|
||||
{"xnetworks.pid", "networks"},
|
||||
};
|
||||
for (const auto& p : kAllPlugins) {
|
||||
if (selfPluginName && std::strcmp(p.name, selfPluginName) == 0) {
|
||||
@@ -1039,6 +1072,8 @@ inline void broadcastThemeReload(const char* selfPluginName = nullptr) {
|
||||
"files",
|
||||
"camera",
|
||||
"themes",
|
||||
"modem",
|
||||
"networks",
|
||||
};
|
||||
for (const char* name : kPlugins) {
|
||||
if (selfPluginName && std::strcmp(name, selfPluginName) == 0) {
|
||||
|
||||
Reference in new issue
Block a user