mirror of
https://github.com/hyprwm/hypridle.git
synced 2024-11-23 10:05:57 +01:00
core: add --version
This commit is contained in:
parent
26780ac51f
commit
9f23e70bb4
2 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,8 @@ else()
|
||||||
message(STATUS "Configuring hypridle in Release with CMake")
|
message(STATUS "Configuring hypridle in Release with CMake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_compile_definitions(HYPRIDLE_VERSION="${VERSION}")
|
||||||
|
|
||||||
include_directories(. "protocols/")
|
include_directories(. "protocols/")
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
|
@ -15,6 +15,11 @@ int main(int argc, char** argv, char** envp) {
|
||||||
else if (arg == "--quiet" || arg == "-q")
|
else if (arg == "--quiet" || arg == "-q")
|
||||||
Debug::quiet = true;
|
Debug::quiet = true;
|
||||||
|
|
||||||
|
else if (arg == "--version" || arg == "-V") {
|
||||||
|
Debug::log(NONE, "hypridle v{}", HYPRIDLE_VERSION);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
else if (arg == "--config" || arg == "-c") {
|
else if (arg == "--config" || arg == "-c") {
|
||||||
if (i + 1 >= argc) {
|
if (i + 1 >= argc) {
|
||||||
Debug::log(NONE, "After " + arg + " you should provide a path to a config file.");
|
Debug::log(NONE, "After " + arg + " you should provide a path to a config file.");
|
||||||
|
|
Loading…
Reference in a new issue