diff --git a/src/main.cpp b/src/main.cpp index b6c6dc3..2a5c01e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,6 +2,14 @@ #include "config/ConfigManager.hpp" #include "core/hyprlock.hpp" +void help(){ + std::cout << "Usage: hyprlock [options]\n\n" + "Options:\n" + " -v, --verbose - Enable verbose logging\n" + " -q, --quiet - Disable logging\n" + " --display (display) - Specify the Wayland display to connect to\n" + " -h, --help - Show this help message\n"; +} int main(int argc, char** argv, char** envp) { std::string wlDisplay; @@ -18,6 +26,10 @@ int main(int argc, char** argv, char** envp) { wlDisplay = argv[i + 1]; i++; } + else if (arg == "--help" || arg == "-h") { + help(); + return 0; + } } try { @@ -35,4 +47,4 @@ int main(int argc, char** argv, char** envp) { g_pHyprlock->run(); return 0; -} \ No newline at end of file +}