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