mirror of
https://github.com/Soundux/Soundux.git
synced 2025-12-20 00:06:30 +01:00
feat: add cli help (#626)
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -58,6 +58,16 @@ int main(int argc, char **arguments)
|
||||
backward::SignalHandling crashHandler;
|
||||
gGuard = std::make_shared<guardpp::guard>("soundux-guard");
|
||||
|
||||
if (std::find(args.begin(), args.end(), "--help") != args.end() ||
|
||||
std::find(args.begin(), args.end(), "-h") != args.end())
|
||||
{
|
||||
Fancy::fancy.message() << "Soundux usage" << std::endl;
|
||||
Fancy::fancy.message() << " -h --help description of launch arguments" << std::endl;
|
||||
Fancy::fancy.message() << " --hidden start application hidden to taskbar" << std::endl;
|
||||
Fancy::fancy.message() << " --reset-mutex fix 'Another instance is already running! error'" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (std::find(args.begin(), args.end(), "--reset-mutex") != args.end())
|
||||
{
|
||||
gGuard->reset();
|
||||
@@ -129,4 +139,4 @@ int main(int argc, char **arguments)
|
||||
gConfig.save();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user