diff options
author | Alessio Molinari <[email protected]> | 2024-02-12 11:34:21 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-12 10:34:21 +0000 |
commit | cca3c6430104836bdf5c060949a13b6b80ff0219 (patch) | |
tree | d349e903893005cbdbd773039c8b5167fd64186d /hyprctl/main.cpp | |
parent | 6e5c78bf632b6b6d3b32f132cf05b8f33ebf0e8a (diff) | |
download | Hyprland-cca3c6430104836bdf5c060949a13b6b80ff0219.tar.gz Hyprland-cca3c6430104836bdf5c060949a13b6b80ff0219.zip |
hyprctl: remove hardcoded hyprctl commands. (#4671)
* fix: remove hardcoded hyprctl commands.
This allows plugin to properly register hyprctl commands.
* fix: restore commands with min args
Diffstat (limited to 'hyprctl/main.cpp')
-rw-r--r-- | hyprctl/main.cpp | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index 281a74ac..b1d89a8a 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -371,44 +371,8 @@ int main(int argc, char** argv) { if (fullRequest.contains("/--batch")) batchRequest(fullRequest); - else if (fullRequest.contains("/monitors")) - request(fullRequest); - else if (fullRequest.contains("/clients")) - request(fullRequest); - else if (fullRequest.contains("/workspaces")) - request(fullRequest); - else if (fullRequest.contains("/activeworkspace")) - request(fullRequest); - else if (fullRequest.contains("/workspacerules")) - request(fullRequest); - else if (fullRequest.contains("/activewindow")) - request(fullRequest); - else if (fullRequest.contains("/layers")) - request(fullRequest); - else if (fullRequest.contains("/version")) - request(fullRequest); - else if (fullRequest.contains("/kill")) - request(fullRequest); - else if (fullRequest.contains("/systeminfo")) - request(fullRequest); - else if (fullRequest.contains("/splash")) - request(fullRequest); - else if (fullRequest.contains("/devices")) - request(fullRequest); - else if (fullRequest.contains("/reload")) - request(fullRequest); - else if (fullRequest.contains("/getoption")) - request(fullRequest); - else if (fullRequest.contains("/binds")) - request(fullRequest); - else if (fullRequest.contains("/cursorpos")) - request(fullRequest); - else if (fullRequest.contains("/animations")) - request(fullRequest); - else if (fullRequest.contains("/globalshortcuts")) - request(fullRequest); - else if (fullRequest.contains("/rollinglog")) - request(fullRequest); + else if (fullRequest.contains("/hyprpaper")) + requestHyprpaper(fullRequest); else if (fullRequest.contains("/switchxkblayout")) request(fullRequest, 2); else if (fullRequest.contains("/seterror")) @@ -429,15 +393,10 @@ int main(int argc, char** argv) { request(fullRequest, 2); else if (fullRequest.contains("/decorations")) request(fullRequest, 1); - else if (fullRequest.contains("/hyprpaper")) - requestHyprpaper(fullRequest); - else if (fullRequest.contains("/layouts")) - request(fullRequest); else if (fullRequest.contains("/--help")) printf("%s", USAGE.c_str()); else { - printf("%s\n", USAGE.c_str()); - return 1; + request(fullRequest); } printf("\n"); |