diff options
| author | Mihai Fufezan <fufexan@protonmail.com> | 2022-07-15 00:09:31 +0300 |
|---|---|---|
| committer | Mihai Fufezan <fufexan@protonmail.com> | 2022-07-15 00:09:31 +0300 |
| commit | d8fee02063343ecabe4853cb9738e1bd7ccb2a11 (patch) | |
| tree | 1a15a59a669379b5f24dda07b9958bdb67e8f159 /src/main.cpp | |
| parent | 01fc3d6068f80c60e4113f14e375070e38329641 (diff) | |
add simple help message
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 753d406d..9367d870 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,9 +19,14 @@ int main(int argc, char** argv) { for (int i = 1; i < argc; ++i) { if (!strcmp(argv[i], "--i-am-really-stupid")) ignoreSudo = true; - if ((!strcmp(argv[i], "-c") || !strcmp(argv[i], "--config")) && argc >= i + 2) { + else if ((!strcmp(argv[i], "-c") || !strcmp(argv[i], "--config")) && argc >= i + 2) { configPath = std::string(argv[++i]); Debug::log(LOG, "Using config location %s.", configPath.c_str()); + } else { + std::cout << "Hyprland usage: Hyprland [arg [...]].\n\nArguments:\n" << + "--help -h | Show this help message\n" << + "--config -c | Specify config file to use\n"; + return 1; } } |
