core: add DataDir and StateDir pragmas

This commit is contained in:
outfoxxed 2025-05-16 20:54:21 -07:00
parent a05c0de53b
commit 325a51c82d
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 47 additions and 11 deletions

View file

@ -111,10 +111,16 @@ class QuickshellGlobal: public QObject {
/// The per-shell data directory.
///
/// Usually `~/.local/share/quickshell/by-shell/<shell-id>`
///
/// Can be overridden using `//@ pragma DataDir $BASE/path` in the root qml file, where `$BASE`
/// corrosponds to `$XDG_DATA_HOME` (usually `~/.local/share`).
Q_PROPERTY(QString dataDir READ dataDir CONSTANT);
/// The per-shell state directory.
///
/// Usually `~/.local/state/quickshell/by-shell/<shell-id>`
///
/// Can be overridden using `//@ pragma StateDir $BASE/path` in the root qml file, where `$BASE`
/// corrosponds to `$XDG_STATE_HOME` (usually `~/.local/state`).
Q_PROPERTY(QString stateDir READ stateDir CONSTANT);
/// The per-shell cache directory.
///