diff options
| author | alba4k <blaskoazzolaaaron@gmail.com> | 2022-06-17 12:18:25 +0200 |
|---|---|---|
| committer | alba4k <blaskoazzolaaaron@gmail.com> | 2022-06-17 12:18:25 +0200 |
| commit | 9c6c5481bbf094f54ea7b9aaa9f941d50b57d6a0 (patch) | |
| tree | 8f7ed62dfdf81e1233ea23bd27e8575b2c716389 /hyprctl/main.cpp | |
| parent | 354e2651289861bf7027fd02be41088e45fc1c99 (diff) | |
revised makefile, newline after execution
Diffstat (limited to 'hyprctl/main.cpp')
| -rw-r--r-- | hyprctl/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index d0c7d9ed..278ef5ee 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -15,8 +15,7 @@ #include <fstream> #include <string> -const std::string USAGE = R"#( -usage: hyprctl [command] [(opt)args] +const std::string USAGE = R"#(usage: hyprctl [command] [(opt)args] monitors workspaces @@ -27,8 +26,7 @@ usage: hyprctl [command] [(opt)args] dispatch keyword version - reload -)#"; + reload)#"; void request(std::string arg) { const auto SERVERSOCKET = socket(AF_UNIX, SOCK_STREAM, 0); @@ -121,7 +119,7 @@ int main(int argc, char** argv) { int bflag = 0, sflag = 0, index, c; if (argc < 2) { - printf("%s", USAGE.c_str()); + printf("%s\n", USAGE.c_str()); return 1; } @@ -136,10 +134,12 @@ int main(int argc, char** argv) { else if (!strcmp(argv[1], "dispatch")) dispatchRequest(argc, argv); else if (!strcmp(argv[1], "keyword")) keywordRequest(argc, argv); else if (!strcmp(argv[1], "--batch")) batchRequest(argc, argv); + else if (!strcmp(argv[1], "--help")) printf(USAGE.c_str()); else { - printf("%s", USAGE.c_str()); + printf("%s\n", USAGE.c_str()); return 1; } + printf("\n"); return 0; }
\ No newline at end of file |
