MCPcopy Create free account
hub / github.com/VirtCode/hypr-dynamic-cursors / dispatchMagnify

Function dispatchMagnify

src/config/ConfigManager.cpp:187–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187SDispatchResult dispatchMagnify(std::string in) {
188 Hyprutils::String::CVarList args = in;
189
190 SDispatchResult result;
191
192 std::optional<int> duration;
193 std::optional<float> size;
194
195 try {
196 auto it = args.begin();
197 if (it != args.end() && *it != "") {
198 duration = std::stoi(*it);
199
200 it++;
201 if (it != args.end())
202 size = std::stof(*it);
203 }
204 } catch (...) {
205 result.error = "invalid types for arguments";
206 Log::logger->log(Log::ERR, "[dynamic-cursors] dispatcher `magnify` received invalid args: {}", in);
207 }
208
209 g_pDynamicCursors->dispatchMagnify(duration, size);
210
211 return result;
212}
213
214int luaMagnifyDispatcher(lua_State* L) {
215 if (!lua_istable(L, 1))

Callers

nothing calls this directly

Calls 1

dispatchMagnifyMethod · 0.80

Tested by

no test coverage detected