38 lines
1.1 KiB
QML
38 lines
1.1 KiB
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
|
|
import qs.config
|
|
import qs.services
|
|
|
|
ShellRoot {
|
|
IpcHandler {
|
|
target: "settings-system-test"
|
|
|
|
function refresh(): void { SystemSettings.refresh(); }
|
|
|
|
function apply(autoHdr: bool, vrr: int, directScanout: int): void {
|
|
SystemSettings.setAutoHdr(autoHdr);
|
|
SystemSettings.setVrrPolicy(vrr);
|
|
SystemSettings.setDirectScanoutPolicy(directScanout);
|
|
}
|
|
|
|
function panelAllowed(panel: string): bool {
|
|
return SystemSettings.isGnomePanelAllowed(panel);
|
|
}
|
|
|
|
function status(): string {
|
|
return JSON.stringify({
|
|
monitorName: SystemSettings.monitorName,
|
|
monitorDescription: SystemSettings.monitorDescription,
|
|
width: SystemSettings.monitorWidth,
|
|
height: SystemSettings.monitorHeight,
|
|
scale: SystemSettings.monitorScale,
|
|
format: SystemSettings.monitorFormat,
|
|
busy: SystemSettings.busy,
|
|
lastError: SystemSettings.lastError
|
|
});
|
|
}
|
|
}
|
|
}
|