sysinfo: allow overriding OS icon (#1091)

* Allow overriding OS icon

Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com>

* Support icons and live reloading

Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com>

* isDefaultLogo should default to true

Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com>

---------

Signed-off-by: Dan Griffiths <dgriffiths@widgitlabs.com>
This commit is contained in:
Evertiro 2026-01-16 23:58:06 -06:00 committed by GitHub
parent d2c06587f5
commit 96942d5ff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View file

@ -126,6 +126,7 @@ Singleton {
function serializeGeneral(): var {
return {
logo: general.logo,
apps: {
terminal: general.apps.terminal,
audio: general.apps.audio,

View file

@ -1,6 +1,7 @@
import Quickshell.Io
JsonObject {
property string logo: ""
property Apps apps: Apps {}
property Idle idle: Idle {}
property Battery battery: Battery {}

View file

@ -1,5 +1,7 @@
pragma Singleton
import qs.config
import qs.utils
import Quickshell
import Quickshell.Io
import QtQuick
@ -34,13 +36,27 @@ Singleton {
root.osIdLike = fd("ID_LIKE").split(" ");
const logo = Quickshell.iconPath(fd("LOGO"), true);
if (logo) {
if (Config.general.logo === "caelestia") {
root.osLogo = Qt.resolvedUrl(`${Quickshell.shellDir}/assets/logo.svg`);
root.isDefaultLogo = true;
} else if (Config.general.logo) {
root.osLogo = Quickshell.iconPath(Config.general.logo, true) || "file://" + Paths.absolutePath(Config.general.logo);
root.isDefaultLogo = false;
} else if (logo) {
root.osLogo = logo;
root.isDefaultLogo = false;
}
}
}
Connections {
target: Config.general
function onLogoChanged(): void {
osRelease.reload();
}
}
Timer {
running: true
repeat: true