mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-15 21:15:24 +02:00
GNOME theme: Restart GNOME button after applying the theme (relogin through GDM when set up, else a logout)
This commit is contained in:
1 parent
0c46b209b9
commit
0bb5708769
6 files changed
+42
-5
No files matched your search
@@ -11,6 +11,8 @@ one per merged pull request.
|
|||||||
- `2ca288d` **fix: the NVIDIA gaming mode setup no longer fails with "the patched gamescope doesn't start" on a gamescope that works: the smoke test judged gamescope's exit status through a pipe into `grep -q` under `pipefail`, so gamescope's crash on the closed pipe (or a hung shutdown) counted as a failed test, intermittently, for the CPU-specific and the generic build alike (seen on an RTX 5080). The test now reads gamescope's output from a file and kills a hung shutdown (`timeout -k`)**
|
- `2ca288d` **fix: the NVIDIA gaming mode setup no longer fails with "the patched gamescope doesn't start" on a gamescope that works: the smoke test judged gamescope's exit status through a pipe into `grep -q` under `pipefail`, so gamescope's crash on the closed pipe (or a hung shutdown) counted as a failed test, intermittently, for the CPU-specific and the generic build alike (seen on an RTX 5080). The test now reads gamescope's output from a file and kills a hung shutdown (`timeout -k`)**
|
||||||
- `645b331` **feat: the GNOME theme installs GNOME Settings with the "GNOME Desktop" panel (dock, desktop icons, tiling) as a prebuilt package, downloaded from the `settings` release of steamify-gnome-theme (built by GitHub Actions on current Arch, rebuilt weekly) and checked against its `.sha256`; a failure keeps the stock Settings. Turning the theme off puts the stock `gnome-control-center` back. Installs with the GNOME theme on re-apply it (feature version 2.13.0)**
|
- `645b331` **feat: the GNOME theme installs GNOME Settings with the "GNOME Desktop" panel (dock, desktop icons, tiling) as a prebuilt package, downloaded from the `settings` release of steamify-gnome-theme (built by GitHub Actions on current Arch, rebuilt weekly) and checked against its `.sha256`; a failure keeps the stock Settings. Turning the theme off puts the stock `gnome-control-center` back. Installs with the GNOME theme on re-apply it (feature version 2.13.0)**
|
||||||
|
|
||||||
|
- **feat: after the GNOME theme is applied in a GNOME session, the app's done screen has "Restart GNOME" (GNOME Shell on Wayland can't restart in place, and the dock, extensions and Settings panel only show after a new login): with GDM autologin (the SteamOS conversion) Steamify's relogin helper logs the user straight back into the session they were in (without changing the session gaming mode's boot goes back to), else it is a plain logout (`gnome-session-quit`)**
|
||||||
|
|
||||||
## 2.12.0 - 2026-10-13
|
## 2.12.0 - 2026-10-13
|
||||||
|
|
||||||
- **feat: setting up the SteamOS conversion on NVIDIA first checks that nothing blocks it (a pacman lock, less than 1.5 GB free), and a failed setup is remembered: a desktop notification now and a reminder in the menu until a setup works**
|
- **feat: setting up the SteamOS conversion on NVIDIA first checks that nothing blocks it (a pacman lock, less than 1.5 GB free), and a failed setup is remembered: a desktop notification now and a reminder in the menu until a setup works**
|
||||||
|
|||||||
+4
-1
@@ -195,7 +195,10 @@ backend_apply() {
|
|||||||
feature_record_unticked
|
feature_record_unticked
|
||||||
os_version_refresh
|
os_version_refresh
|
||||||
[[ " ${TO_DISABLE[*]} ${TO_ENABLE[*]} " =~ \ (gaming|single|boot|kpin)\ ]] && RESTART_FOR_LOGIN=true
|
[[ " ${TO_DISABLE[*]} ${TO_ENABLE[*]} " =~ \ (gaming|single|boot|kpin)\ ]] && RESTART_FOR_LOGIN=true
|
||||||
backend_event finished "\"failed\":$(json_list "${failed[@]}"),\"restart\":$(restart_needed && echo true || echo false)"
|
# (Only when the theme itself worked: a failed one has nothing to log in again for.)
|
||||||
|
local relogin=false
|
||||||
|
[[ " ${failed[*]:-} " != *" gnometheme "* ]] && gnometheme_relogin_needed "${TO_DISABLE[@]}" "${TO_ENABLE[@]}" && relogin=true
|
||||||
|
backend_event finished "\"failed\":$(json_list "${failed[@]}"),\"restart\":$(restart_needed && echo true || echo false),\"relogin\":$relogin"
|
||||||
}
|
}
|
||||||
|
|
||||||
backend_main() {
|
backend_main() {
|
||||||
|
|||||||
@@ -111,6 +111,22 @@ gnometheme_shell() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gnometheme_relogin_needed() {
|
||||||
|
# A GNOME session is running and this run changed the theme: GNOME Shell on Wayland can't be restarted in place, so
|
||||||
|
# the new extensions, the dock and the Settings panel show after the user logs in again.
|
||||||
|
[[ " $* " == *" gnometheme "* ]] && pgrep -u "$(id -u)" -x gnome-shell >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
gnometheme_relogin() {
|
||||||
|
# End the GNOME session. With GDM autologin set up by the conversion, steamify-gdm-relogin logs the user straight back
|
||||||
|
# into the session they were in (GDM takes it from AccountsService; the session is not changed here, unlike
|
||||||
|
# steamos-session-select, which would make GNOME the one gaming mode's boot goes back to). Without that helper there
|
||||||
|
# is no autologin: a plain logout, and the user logs in again.
|
||||||
|
local helper=/usr/local/libexec/steamify-gdm-relogin
|
||||||
|
if [[ -x "$helper" ]] && sudo -n "$helper"; then return 0; fi
|
||||||
|
gnome-session-quit --logout --no-prompt
|
||||||
|
}
|
||||||
|
|
||||||
gnometheme_settings_install() {
|
gnometheme_settings_install() {
|
||||||
# The prebuilt GNOME Settings with the Desktop panel, replacing the stock one. Never fatal: the theme works without the
|
# The prebuilt GNOME Settings with the Desktop panel, replacing the stock one. Never fatal: the theme works without the
|
||||||
# panel, so a failed download or install keeps the stock Settings and says so.
|
# panel, so a failed download or install keeps the stock Settings and says so.
|
||||||
@@ -172,6 +188,8 @@ gnometheme_enable() {
|
|||||||
gnometheme_shell
|
gnometheme_shell
|
||||||
gnometheme_settings_install
|
gnometheme_settings_install
|
||||||
ok "SteamOS theme for GNOME on (apps pick up the colors when they start again)."
|
ok "SteamOS theme for GNOME on (apps pick up the colors when they start again)."
|
||||||
|
# (GNOME Shell on Wayland can't restart in place: the app offers "Restart GNOME", which is this.)
|
||||||
|
gnometheme_relogin_needed gnometheme && info "Log out and back in for the dock, the extensions and the Settings panel to show."
|
||||||
}
|
}
|
||||||
|
|
||||||
gnometheme_disable() {
|
gnometheme_disable() {
|
||||||
|
|||||||
+4
-2
@@ -18,6 +18,7 @@ Item {
|
|||||||
property var steps: ({}) // id -> "wait"|"run"|"ok"|"fail"
|
property var steps: ({}) // id -> "wait"|"run"|"ok"|"fail"
|
||||||
property var failed: []
|
property var failed: []
|
||||||
property bool restartNeeded: false
|
property bool restartNeeded: false
|
||||||
|
property bool reloginNeeded: false // GNOME loads the new theme's extensions at the next login
|
||||||
// Review & apply only when something would change; "Re-apply what's on"
|
// Review & apply only when something would change; "Re-apply what's on"
|
||||||
// is for when nothing did.
|
// is for when nothing did.
|
||||||
readonly property bool canApply: computePlan().length > 0
|
readonly property bool canApply: computePlan().length > 0
|
||||||
@@ -123,7 +124,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- Password and apply ---
|
// --- Password and apply ---
|
||||||
function resetRun() { steps = {}; failed = []; restartNeeded = false; runError = ""; doneCount = 0; logModel.clear(); }
|
function resetRun() { steps = {}; failed = []; restartNeeded = false; reloginNeeded = false; runError = ""; doneCount = 0; logModel.clear(); }
|
||||||
function startApply(password) {
|
function startApply(password) {
|
||||||
resetRun();
|
resetRun();
|
||||||
var s = {};
|
var s = {};
|
||||||
@@ -203,7 +204,7 @@ Item {
|
|||||||
// A successful BIOS check ends with bios-ready instead, keeping
|
// A successful BIOS check ends with bios-ready instead, keeping
|
||||||
// the password for the flash.
|
// the password for the flash.
|
||||||
app.sessionPassword = "";
|
app.sessionPassword = "";
|
||||||
app.failed = ev.failed || []; app.restartNeeded = !!ev.restart;
|
app.failed = ev.failed || []; app.restartNeeded = !!ev.restart; app.reloginNeeded = !!ev.relogin;
|
||||||
app.runError = app.errorText(ev.error);
|
app.runError = app.errorText(ev.error);
|
||||||
app.screen = "done";
|
app.screen = "done";
|
||||||
}
|
}
|
||||||
@@ -249,6 +250,7 @@ Item {
|
|||||||
else if (a === "release") { holding = false; if (holdProgress < 1) holdProgress = 0; }
|
else if (a === "release") { holding = false; if (holdProgress < 1) holdProgress = 0; }
|
||||||
} else if (screen === "done") {
|
} else if (screen === "done") {
|
||||||
if (a === "accept" && restartNeeded) backend.restart();
|
if (a === "accept" && restartNeeded) backend.restart();
|
||||||
|
else if (a === "accept" && reloginNeeded) backend.restartGnome();
|
||||||
else if (a === "back" || a === "accept") backToMenu();
|
else if (a === "back" || a === "accept") backToMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ Item {
|
|||||||
readonly property bool problem: app.failed.length > 0 || app.runError !== ""
|
readonly property bool problem: app.failed.length > 0 || app.runError !== ""
|
||||||
readonly property string message: {
|
readonly property string message: {
|
||||||
if (app.runError) return app.runError;
|
if (app.runError) return app.runError;
|
||||||
if (!app.biosRun) return app.plan.length + (app.plan.length === 1 ? " change" : " changes") + " applied." + (app.restartNeeded ? " Some take effect after a restart." : "");
|
if (!app.biosRun) return app.plan.length + (app.plan.length === 1 ? " change" : " changes") + " applied." + (app.restartNeeded ? " Some take effect after a restart." : "")
|
||||||
|
+ (app.reloginNeeded && !app.restartNeeded ? " GNOME shows the dock, extensions and Settings panel after you log in again: Restart GNOME does that." : "");
|
||||||
if (app.failed.length) return "The BIOS was not changed.";
|
if (app.failed.length) return "The BIOS was not changed.";
|
||||||
return (app.bios && app.bios.dryRun ? "Dry run: nothing was flashed. " : "BIOS " + (app.biosInfo.newest || "") + " is staged and is written during the restart. ")
|
return (app.bios && app.bios.dryRun ? "Dry run: nothing was flashed. " : "BIOS " + (app.biosInfo.newest || "") + " is staged and is written during the restart. ")
|
||||||
+ "Keep the power on and don't touch the machine until it has fully started again, even if the screen stays black.";
|
+ "Keep the power on and don't touch the machine until it has fully started again, even if the screen stays black.";
|
||||||
@@ -33,6 +34,7 @@ Item {
|
|||||||
delegate: Text { required property string line; width: details.width - 12; text: line; color: "#aab5c4"; font.family: Theme.mono; font.pixelSize: 13; wrapMode: Text.WrapAnywhere } } }
|
delegate: Text { required property string line; width: details.width - 12; text: line; color: "#aab5c4"; font.family: Theme.mono; font.pixelSize: 13; wrapMode: Text.WrapAnywhere } } }
|
||||||
Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 14; topPadding: 8
|
Row { anchors.horizontalCenter: parent.horizontalCenter; spacing: 14; topPadding: 8
|
||||||
Btn { k: Input.g.back; text: "Back to the menu"; height: 52; onClicked: app.act("back") }
|
Btn { k: Input.g.back; text: "Back to the menu"; height: 52; onClicked: app.act("back") }
|
||||||
Btn { visible: app.restartNeeded; k: Input.g.ok; text: "Restart now"; primary: true; height: 52; onClicked: app.backend.restart() } }
|
Btn { visible: app.restartNeeded; k: Input.g.ok; text: "Restart now"; primary: true; height: 52; onClicked: app.backend.restart() }
|
||||||
|
Btn { visible: app.reloginNeeded && !app.restartNeeded; k: Input.g.ok; text: "Restart GNOME"; primary: true; height: 52; onClicked: app.backend.restartGnome() } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -345,6 +345,16 @@ class Backend(QObject):
|
|||||||
def restart(self):
|
def restart(self):
|
||||||
QProcess.startDetached("systemctl", ["reboot"])
|
QProcess.startDetached("systemctl", ["reboot"])
|
||||||
|
|
||||||
|
@Slot()
|
||||||
|
def restartGnome(self):
|
||||||
|
# GNOME Shell on Wayland can't restart in place: end the session. With GDM autologin (the SteamOS conversion)
|
||||||
|
# Steamify's helper logs the user straight back in; else a plain logout.
|
||||||
|
import subprocess
|
||||||
|
helper = "/usr/local/libexec/steamify-gdm-relogin"
|
||||||
|
if os.access(helper, os.X_OK) and subprocess.run(["sudo", "-n", helper], capture_output=True).returncode == 0:
|
||||||
|
return
|
||||||
|
QProcess.startDetached("gnome-session-quit", ["--logout", "--no-prompt"])
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if self._proc and self._proc.state() != QProcess.NotRunning:
|
if self._proc and self._proc.state() != QProcess.NotRunning:
|
||||||
self._proc.kill()
|
self._proc.kill()
|
||||||
|
|||||||
Reference in new issue
Block a user