aboutsummaryrefslogtreecommitdiffstats
path: root/appearance
diff options
context:
space:
mode:
Diffstat (limited to 'appearance')
-rw-r--r--appearance/AppearancePanel.qml4
-rw-r--r--appearance/README.md3
-rw-r--r--appearance/Udt.qml8
-rw-r--r--appearance/Wallpapers.qml7
4 files changed, 22 insertions, 0 deletions
diff --git a/appearance/AppearancePanel.qml b/appearance/AppearancePanel.qml
index 27a0196..708682c 100644
--- a/appearance/AppearancePanel.qml
+++ b/appearance/AppearancePanel.qml
@@ -31,6 +31,10 @@ Scope {
function show(which) {
if (which) root.tab = which;
root.notice = "";
+ // Schemes and wallpapers can both have changed since this shell
+ // started, which for an autostarted one is the whole session.
+ Udt.refresh();
+ Wallpapers.refresh();
root.open = true;
}
function close() { root.open = false; }
diff --git a/appearance/README.md b/appearance/README.md
index f0e9a09..aba231a 100644
--- a/appearance/README.md
+++ b/appearance/README.md
@@ -62,6 +62,9 @@ are.
The list comes from the palette directory rather than a hardcoded set, so
adding a scheme to unified-desktop-theme is enough to make it appear here.
+Both the scheme list and the wallpaper scan are redone every time the panel
+opens: this shell is autostarted and runs all session, so a scan done only at
+startup would go stale the first time anything was added.
Applying writes the `scheme =` line in `~/.config/udt/roles.conf` and runs
`install.sh`, which regenerates every themed config. **It reloads nothing**,
diff --git a/appearance/Udt.qml b/appearance/Udt.qml
index 30ae285..81e6427 100644
--- a/appearance/Udt.qml
+++ b/appearance/Udt.qml
@@ -71,6 +71,14 @@ Singleton {
// The scheme list comes from the palette directory rather than the comment
// in roles.conf: adding a scheme is adding two files, and this then needs
// no edit at all.
+ // Rescanned whenever the panel opens: adding a scheme is adding two
+ // files, and a shell that has been running since before they appeared
+ // would otherwise keep showing the old list.
+ function refresh() {
+ listProc.running = false;
+ listProc.running = true;
+ }
+
Process {
id: listProc
running: true
diff --git a/appearance/Wallpapers.qml b/appearance/Wallpapers.qml
index 0d61f90..0317ea5 100644
--- a/appearance/Wallpapers.qml
+++ b/appearance/Wallpapers.qml
@@ -55,7 +55,14 @@ Singleton {
// Sorted by most recent first: the wallpaper wanted now is usually one
// added recently. -maxdepth keeps a stray git checkout from being walked.
+ function refresh() {
+ scanning = true;
+ scanProc.running = false;
+ scanProc.running = true;
+ }
+
Process {
+ id: scanProc
running: true
command: ["sh", "-c",
`find ${JSON.stringify(root.dir)} -maxdepth 2 -type f ` +