feat: add --workdir
This commit is contained in:
parent
63180382be
commit
04c4cfe7e0
|
@ -21,7 +21,9 @@ int main(int argc, char** argv) {
|
|||
parser.addVersionOption();
|
||||
|
||||
auto configOption = QCommandLineOption({"c", "config"}, "Path to configuration file.", "path");
|
||||
auto workdirOption = QCommandLineOption({"d", "workdir"}, "Initial working directory.", "path");
|
||||
parser.addOption(configOption);
|
||||
parser.addOption(workdirOption);
|
||||
parser.process(app);
|
||||
|
||||
QString configPath;
|
||||
|
@ -39,6 +41,10 @@ int main(int argc, char** argv) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (parser.isSet(workdirOption)) {
|
||||
QDir::setCurrent(parser.value(workdirOption));
|
||||
}
|
||||
|
||||
QuickshellPlugin::initPlugins();
|
||||
|
||||
// Base window transparency appears to be additive.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "qmlglobal.hpp"
|
||||
#include <utility>
|
||||
|
||||
#include <qcontainerfwd.h>
|
||||
#include <qcoreapplication.h>
|
||||
|
|
Loading…
Reference in a new issue