MCPcopy Create free account
hub / github.com/cafali/SnapKey / ListLayouts

Function ListLayouts

SnapKey.cpp:60–74  ·  view source on GitHub ↗

select layout via context menu v 1.2.9

Source from the content-addressed store, hash-verified

58
59// select layout via context menu v 1.2.9
60vector<string> ListLayouts() {
61 vector<string> layouts;
62 string path = "meta\\profiles";
63 if (!fs::exists(path)) return layouts;
64
65 for (auto& entry : fs::directory_iterator(path)) {
66 if (entry.is_regular_file()) {
67 auto ext = entry.path().extension().string();
68 if (ext == ".cfg") {
69 layouts.push_back(entry.path().stem().string()); // ignore file extension
70 }
71 }
72 }
73 return layouts;
74}
75
76// apply layout (replace config.cfg content) v 1.2.9
77void ApplyLayout(const string& layoutName) {

Callers 1

WndProcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected