mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge branch 'main' of github.com:noctalia-dev/noctalia-shell
This commit is contained in:
@@ -145,7 +145,9 @@ ColumnLayout {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
fastfetchProcess.running = true;
|
||||
// Check if fastfetch is available before trying to run it
|
||||
checkFastfetchProcess.running = true;
|
||||
|
||||
Logger.d("VersionSubTab", "Current version:", root.currentVersion);
|
||||
Logger.d("VersionSubTab", "Is git version:", root.isGitVersion);
|
||||
// Only fetch commit info for -git versions
|
||||
@@ -286,6 +288,29 @@ ColumnLayout {
|
||||
stderr: StdioCollector {}
|
||||
}
|
||||
|
||||
// Check if fastfetch is available before attempting to run it
|
||||
Process {
|
||||
id: checkFastfetchProcess
|
||||
command: ["sh", "-c", "command -v fastfetch"]
|
||||
running: false
|
||||
|
||||
onExited: function (exitCode) {
|
||||
if (exitCode === 0) {
|
||||
// fastfetch is available, run it
|
||||
Logger.d("VersionSubTab", "fastfetch found, running it");
|
||||
fastfetchProcess.running = true;
|
||||
} else {
|
||||
// fastfetch not found, show error state immediately
|
||||
Logger.w("VersionSubTab", "fastfetch not found");
|
||||
root.systemInfoLoading = false;
|
||||
root.systemInfoAvailable = false;
|
||||
}
|
||||
}
|
||||
|
||||
stdout: StdioCollector {}
|
||||
stderr: StdioCollector {}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: fastfetchProcess
|
||||
command: ["fastfetch", "--format", "json", "--config", "none"]
|
||||
|
||||
Reference in New Issue
Block a user