forked from quickshell/quickshell
feat: add support for getting and setting workdir
This commit is contained in:
parent
b5f50cd68f
commit
bbe64f42f3
8 changed files with 109 additions and 2 deletions
|
@ -10,9 +10,12 @@
|
|||
class ShellConfig {
|
||||
Q_GADGET;
|
||||
Q_PROPERTY(bool watchFiles MEMBER mWatchFiles);
|
||||
Q_PROPERTY(QString workingDirectory WRITE setWorkingDirectory);
|
||||
|
||||
public:
|
||||
bool mWatchFiles = true;
|
||||
|
||||
void setWorkingDirectory(const QString& workingDirectory);
|
||||
};
|
||||
|
||||
///! Root config element
|
||||
|
@ -20,6 +23,8 @@ class ShellRoot: public ReloadPropagator {
|
|||
Q_OBJECT;
|
||||
/// If `config.watchFiles` is true the configuration will be reloaded whenever it changes.
|
||||
/// Defaults to true.
|
||||
///
|
||||
/// `config.workingDirectory` corrosponds to [Quickshell.workingDirectory](../quickshell#prop.workingDirectory).
|
||||
Q_PROPERTY(ShellConfig config READ config WRITE setConfig);
|
||||
QML_ELEMENT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue