forked from quickshell/quickshell
core/qmlglobal: expose cacheDir
This commit is contained in:
parent
fee4942771
commit
69c7f4fe77
3 changed files with 16 additions and 0 deletions
|
@ -108,6 +108,10 @@ class QuickshellGlobal: public QObject {
|
|||
/// If true then the configuration will be reloaded whenever any files change.
|
||||
/// Defaults to true.
|
||||
Q_PROPERTY(bool watchFiles READ watchFiles WRITE setWatchFiles NOTIFY watchFilesChanged);
|
||||
/// The per-shell cache directory.
|
||||
///
|
||||
/// Usually `~/.cache/quickshell/by-shell/<shell-id>`
|
||||
Q_PROPERTY(QString cacheDir READ cacheDir CONSTANT);
|
||||
// clang-format on
|
||||
QML_SINGLETON;
|
||||
QML_NAMED_ELEMENT(Quickshell);
|
||||
|
@ -152,6 +156,8 @@ public:
|
|||
[[nodiscard]] bool watchFiles() const;
|
||||
void setWatchFiles(bool watchFiles);
|
||||
|
||||
[[nodiscard]] QString cacheDir() const;
|
||||
|
||||
static QuickshellGlobal* create(QQmlEngine* engine, QJSEngine* /*unused*/);
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue