mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 18:05:58 +01:00
Merge pull request #234 from alba4k/main
revised makefile, newline after execution
This commit is contained in:
commit
f7bdc2e870
2 changed files with 10 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
clean:
|
|
||||||
rm -rf ./hyprctl ./hyprctl
|
|
||||||
all:
|
all:
|
||||||
g++ -std=c++20 ./main.cpp -o ./hyprctl
|
g++ -std=c++20 ./main.cpp -o ./hyprctl
|
||||||
|
clean:
|
||||||
|
rm ./hyprctl
|
|
@ -15,8 +15,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
const std::string USAGE = R"#(
|
const std::string USAGE = R"#(usage: hyprctl [command] [(opt)args]
|
||||||
usage: hyprctl [command] [(opt)args]
|
|
||||||
|
|
||||||
monitors
|
monitors
|
||||||
workspaces
|
workspaces
|
||||||
|
@ -27,8 +26,7 @@ usage: hyprctl [command] [(opt)args]
|
||||||
dispatch
|
dispatch
|
||||||
keyword
|
keyword
|
||||||
version
|
version
|
||||||
reload
|
reload)#";
|
||||||
)#";
|
|
||||||
|
|
||||||
void request(std::string arg) {
|
void request(std::string arg) {
|
||||||
const auto SERVERSOCKET = socket(AF_UNIX, SOCK_STREAM, 0);
|
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;
|
int bflag = 0, sflag = 0, index, c;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
printf("%s", USAGE.c_str());
|
printf("%s\n", USAGE.c_str());
|
||||||
return 1;
|
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], "dispatch")) dispatchRequest(argc, argv);
|
||||||
else if (!strcmp(argv[1], "keyword")) keywordRequest(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], "--batch")) batchRequest(argc, argv);
|
||||||
|
else if (!strcmp(argv[1], "--help")) printf("%s", USAGE.c_str());
|
||||||
else {
|
else {
|
||||||
printf("%s", USAGE.c_str());
|
printf("%s\n", USAGE.c_str());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue