diff options
author | dranull <[email protected]> | 2024-01-14 17:12:52 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-14 18:12:52 +0100 |
commit | 13d9a637d61ffdd0cb23dda80f6a971f17e0f5b3 (patch) | |
tree | 7460428fe95e9503ea744302246cbd476de1ac3d /src/debug/HyprCtl.cpp | |
parent | 4cee94b91c9337036f3ea94f80cf8259c5c51cb4 (diff) | |
download | Hyprland-13d9a637d61ffdd0cb23dda80f6a971f17e0f5b3.tar.gz Hyprland-13d9a637d61ffdd0cb23dda80f6a971f17e0f5b3.zip |
hyprctl: screen_shader config fixes (#4102)
* Allow "/" in values of requests
* Don't tick on empty value
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r-- | src/debug/HyprCtl.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 78d20903..490f14c9 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -1402,13 +1402,20 @@ std::string getReply(std::string request) { auto format = HyprCtl::FORMAT_NORMAL; // process flags for non-batch requests - if (!request.contains("[[BATCH]]") && request.contains("/")) { + if (!request.starts_with("[[BATCH]]") && request.contains("/")) { long unsigned int sepIndex = 0; for (const auto& c : request) { if (c == '/') { // stop at separator break; } + // after whitespace assume the first word as a keyword, + // so its value can have slashes (e.g., a path) + if (c == ' ') { + sepIndex = request.size(); + break; + } + sepIndex++; if (c == 'j') |