Integrate Phase 2 desktop settings

This commit is contained in:
Gabriel Brown
2026-08-18 15:00:19 -04:00
parent d2898d8806
commit 21beb066e1
3 changed files with 18 additions and 10 deletions
@@ -46,6 +46,8 @@ Singleton {
property var displayCanConfirm: function() { return Displays.canConfirm; } property var displayCanConfirm: function() { return Displays.canConfirm; }
property var confirmDisplayLayout: function() { return Displays.confirm(); } property var confirmDisplayLayout: function() { return Displays.confirm(); }
property var setDisplayBlocked: function(blocked) { Displays.externalChangeBlocked = blocked; } property var setDisplayBlocked: function(blocked) { Displays.externalChangeBlocked = blocked; }
property var applyIdle: function() { IdleLock.apply(); }
property var idleBusy: function() { return IdleLock.busy; }
property var applyCompositor: function() { SystemSettings.applyPersistedDisplayPolicy(); } property var applyCompositor: function() { SystemSettings.applyPersistedDisplayPolicy(); }
property var reloadKeybinds: function() { Keybinds.applyReload(); } property var reloadKeybinds: function() { Keybinds.applyReload(); }
property var keybindsReloading: function() { return Keybinds.reloading; } property var keybindsReloading: function() { return Keybinds.reloading; }
@@ -147,10 +149,11 @@ Singleton {
// DesktopPreferences.reload() invalidates reactive shell bindings. // DesktopPreferences.reload() invalidates reactive shell bindings.
// These services also own state outside QML and need an explicit // These services also own state outside QML and need an explicit
// replay: compositor options, Lua-generated binds, and hyprpaper. // replay: compositor options, Lua-generated binds, and hyprpaper.
root.applyCompositor(); root.applyIdle();
root.reloadKeybinds();
root.applyWallpaperPolicy();
root.regenerateLock(); root.regenerateLock();
root.applyWallpaperPolicy();
root.reloadKeybinds();
root.applyCompositor();
settleReload.attempts = 0; settleReload.attempts = 0;
settleReload.restart(); settleReload.restart();
@@ -167,7 +170,7 @@ Singleton {
// Let the current instances finish their external writes before a // Let the current instances finish their external writes before a
// soft reload replaces them. The cap keeps a failed external tool // soft reload replaces them. The cap keeps a failed external tool
// from leaving restored Home state stale indefinitely. // from leaving restored Home state stale indefinitely.
if ((!root.keybindsReloading() && !root.systemBusy() if ((!root.idleBusy() && !root.keybindsReloading() && !root.systemBusy()
&& !root.wallpaperBusy() && !root.lockBusy()) || attempts >= 30) { && !root.wallpaperBusy() && !root.lockBusy()) || attempts >= 30) {
stop(); stop();
root.setDisplayBlocked(false); root.setDisplayBlocked(false);
@@ -93,6 +93,8 @@ ShellRoot {
root.record("display.block:" + blocked); root.record("display.block:" + blocked);
root.displayBlocked = blocked; root.displayBlocked = blocked;
}; };
SettingsBackup.applyIdle = function() { root.record("idle.apply"); };
SettingsBackup.idleBusy = function() { return false; };
SettingsBackup.applyCompositor = function() { root.record("system.apply"); }; SettingsBackup.applyCompositor = function() { root.record("system.apply"); };
SettingsBackup.reloadKeybinds = function() { root.record("keybinds.reload"); }; SettingsBackup.reloadKeybinds = function() { root.record("keybinds.reload"); };
SettingsBackup.keybindsReloading = function() { return false; }; SettingsBackup.keybindsReloading = function() { return false; };
@@ -48,6 +48,7 @@ for mapping in \
'Displays.applyProtectedLayout(layout);' \ 'Displays.applyProtectedLayout(layout);' \
'Displays.canConfirm;' \ 'Displays.canConfirm;' \
'Displays.confirm();' \ 'Displays.confirm();' \
'IdleLock.apply();' \
'Displays.externalChangeBlocked = blocked;' \ 'Displays.externalChangeBlocked = blocked;' \
'SystemSettings.applyPersistedDisplayPolicy();' \ 'SystemSettings.applyPersistedDisplayPolicy();' \
'Keybinds.applyReload();' \ 'Keybinds.applyReload();' \
@@ -91,10 +92,11 @@ jq -e '
"desktop.reload", "desktop.reload",
"display.apply:[{\"name\":\"DP-2\",\"width\":4500,\"height\":3000,\"refreshRate\":60,\"mode\":\"4500x3000@60\",\"scale\":1.5,\"transform\":0,\"x\":-2560,\"y\":0,\"primary\":false},{\"name\":\"HDMI-A-1\",\"width\":2560,\"height\":1440,\"refreshRate\":60,\"mode\":\"2560x1440@60\",\"scale\":1,\"transform\":0,\"x\":0,\"y\":0,\"primary\":true}]", "display.apply:[{\"name\":\"DP-2\",\"width\":4500,\"height\":3000,\"refreshRate\":60,\"mode\":\"4500x3000@60\",\"scale\":1.5,\"transform\":0,\"x\":-2560,\"y\":0,\"primary\":false},{\"name\":\"HDMI-A-1\",\"width\":2560,\"height\":1440,\"refreshRate\":60,\"mode\":\"2560x1440@60\",\"scale\":1,\"transform\":0,\"x\":0,\"y\":0,\"primary\":true}]",
"display.confirm", "display.confirm",
"system.apply", "idle.apply",
"keybinds.reload",
"wallpaper.apply-policy",
"lock.regenerate", "lock.regenerate",
"wallpaper.apply-policy",
"keybinds.reload",
"system.apply",
"display.block:false", "display.block:false",
"shell.reload" "shell.reload"
] ]
@@ -131,10 +133,11 @@ jq -e '
"desktop.reload", "desktop.reload",
"display.apply:[{\"name\":\"DP-2\",\"width\":4500,\"height\":3000,\"refreshRate\":60,\"mode\":\"4500x3000@60\",\"scale\":1.5,\"transform\":0,\"x\":-2560,\"y\":0,\"primary\":false},{\"name\":\"HDMI-A-1\",\"width\":2560,\"height\":1440,\"refreshRate\":60,\"mode\":\"2560x1440@60\",\"scale\":1,\"transform\":0,\"x\":0,\"y\":0,\"primary\":true}]", "display.apply:[{\"name\":\"DP-2\",\"width\":4500,\"height\":3000,\"refreshRate\":60,\"mode\":\"4500x3000@60\",\"scale\":1.5,\"transform\":0,\"x\":-2560,\"y\":0,\"primary\":false},{\"name\":\"HDMI-A-1\",\"width\":2560,\"height\":1440,\"refreshRate\":60,\"mode\":\"2560x1440@60\",\"scale\":1,\"transform\":0,\"x\":0,\"y\":0,\"primary\":true}]",
"display.confirm", "display.confirm",
"system.apply", "idle.apply",
"keybinds.reload",
"wallpaper.apply-policy",
"lock.regenerate", "lock.regenerate",
"wallpaper.apply-policy",
"keybinds.reload",
"system.apply",
"display.block:false", "display.block:false",
"shell.reload" "shell.reload"
] ]