Give the desktop real themes, video wallpapers, and honest titlebars
Appearance now opens on Themes: light and dark side by side, each remembering its own choice, over galleries of ten shipped themes — Tokyo Moon and Day joined by Moon Rose, Catppuccin, Nord, Gruvbox and Everforest in both modes. A theme is a complete palette: the catalog lives in themes.json, Theme.qml reads every color token from the active record, and one render pipeline carries it to kitty, tmux, btop, GTK, Vicinae, Firefox's chrome, and the lock screen. The Theme editor builds new ones from four wells — wheel, hex, or eyedropper — with derived surfaces, a saturation slider, debounced fine-tune, and effects that save with the theme. Custom edits finally keep GNOME's accent, kitty's border, and hyprlock in sync. Wallpapers can be video: mpvpaper per output, hardware-decoded, muted and looped, supervised and respawned. Panama owns the pausing — games, battery, and a bar pill for right now — because the compositor rebuilds full-screen blur for every frame a video wallpaper draws. The lock screen gets a still frame. Titlebars stop lying. GNOME apps get close-only on your chosen side, the maximize and double-click settings are gone, the Settings window obeys the same rules, and its titlebar can be turned off entirely. Typography becomes five labeled dropdowns instead of a wall of samples. Contracts updated and written throughout (165 now); per the redesign workflow none were executed — the full sweep runs once at the end. Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -126,8 +126,16 @@ Singleton {
|
||||
id: restore
|
||||
interval: 1500
|
||||
onTriggered: {
|
||||
if (root.startupRestoreEnabled)
|
||||
root.applyCurrentPolicy(false);
|
||||
if (!root.startupRestoreEnabled)
|
||||
return;
|
||||
// A stored video wallpaper restores through mpvpaper; handing its
|
||||
// path to the hyprpaper transaction would only fail validation.
|
||||
if (DesktopPreferences.get("wallpaperMode") === "single"
|
||||
&& VideoWallpaper.isVideo(root.configured)) {
|
||||
VideoWallpaper.start(root.configured);
|
||||
return;
|
||||
}
|
||||
root.applyCurrentPolicy(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +205,10 @@ Singleton {
|
||||
function currentPolicy(): var {
|
||||
return {
|
||||
mode: DesktopPreferences.get("wallpaperMode") ?? "single",
|
||||
globalPath: root.configured === "" ? root.shippedPath : root.configured,
|
||||
// A stored video path cannot serve as a hyprpaper still; policies
|
||||
// built while one is stored fall back to the shipped image.
|
||||
globalPath: root.configured === "" || VideoWallpaper.isVideo(root.configured)
|
||||
? root.shippedPath : root.configured,
|
||||
collection: DesktopPreferences.get("wallpaperSlideshowPaths") ?? [],
|
||||
intervalMinutes: DesktopPreferences.get("wallpaperIntervalMinutes") ?? 30,
|
||||
shuffle: DesktopPreferences.get("wallpaperShuffle") !== false,
|
||||
@@ -335,6 +346,10 @@ Singleton {
|
||||
}
|
||||
|
||||
function applyCurrentPolicy(persist: bool): bool {
|
||||
// While mpvpaper holds the background, hyprpaper has nothing to apply
|
||||
// — hotplug is VideoWallpaper's problem and it respawns per output.
|
||||
if (VideoWallpaper.active)
|
||||
return true;
|
||||
return root.applyPolicy(root.currentPolicy(), persist === true, false);
|
||||
}
|
||||
|
||||
@@ -374,6 +389,19 @@ Singleton {
|
||||
}
|
||||
|
||||
function setSingle(path: string): bool {
|
||||
// A video routes to mpvpaper instead of hyprpaper; it still rides
|
||||
// wallpaperPath so restore, backup, and the picker's "current" ring
|
||||
// treat both kinds the same.
|
||||
if (VideoWallpaper.isVideo(path)) {
|
||||
if (!VideoWallpaper.start(path)) {
|
||||
root.lastError = VideoWallpaper.lastError;
|
||||
return false;
|
||||
}
|
||||
root.lastError = "";
|
||||
DesktopPreferences.set("wallpaperMode", "single");
|
||||
DesktopPreferences.set("wallpaperPath", path);
|
||||
return true;
|
||||
}
|
||||
const effectivePath = path === "" ? root.shippedPath : path;
|
||||
const allowed = root.candidates([]);
|
||||
if (!WallpaperPolicy.validPath(effectivePath, allowed)) {
|
||||
@@ -384,20 +412,53 @@ Singleton {
|
||||
policy.mode = "single";
|
||||
policy.globalPath = effectivePath;
|
||||
policy.slideshowPath = effectivePath;
|
||||
// Returning from a video: stop mpvpaper first, then give hyprpaper's
|
||||
// service a beat to come back before the transaction talks to it.
|
||||
if (VideoWallpaper.active) {
|
||||
VideoWallpaper.stop();
|
||||
root.pendingStillPolicy = policy;
|
||||
stillAfterVideo.restart();
|
||||
return true;
|
||||
}
|
||||
return root.applyPolicy(policy, true, false);
|
||||
}
|
||||
|
||||
property var pendingStillPolicy: null
|
||||
|
||||
Timer {
|
||||
id: stillAfterVideo
|
||||
interval: 900
|
||||
onTriggered: {
|
||||
if (root.pendingStillPolicy) {
|
||||
root.applyPolicy(root.pendingStillPolicy, true, false);
|
||||
root.pendingStillPolicy = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setMode(mode: string): bool {
|
||||
if (!["single", "slideshow", "per-monitor"].includes(mode))
|
||||
return false;
|
||||
const policy = root.currentPolicy();
|
||||
policy.mode = mode;
|
||||
// Slideshow and per-display are hyprpaper's modes; a stored video path
|
||||
// cannot serve as their global still, so fall back to the shipped one.
|
||||
if (VideoWallpaper.isVideo(policy.globalPath)) {
|
||||
policy.globalPath = root.shippedPath;
|
||||
policy.slideshowPath = root.shippedPath;
|
||||
}
|
||||
if (mode === "slideshow") {
|
||||
const collection = WallpaperPolicy.validCollection(
|
||||
policy.collection, root.candidates([]));
|
||||
if (!collection.includes(policy.slideshowPath))
|
||||
policy.slideshowPath = collection[0] || policy.globalPath;
|
||||
}
|
||||
if (VideoWallpaper.active) {
|
||||
VideoWallpaper.stop();
|
||||
root.pendingStillPolicy = policy;
|
||||
stillAfterVideo.restart();
|
||||
return true;
|
||||
}
|
||||
return root.applyPolicy(policy, true, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user