mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
ipc: new bar setPosition
This commit is contained in:
@@ -45,6 +45,18 @@ Singleton {
|
||||
Settings.data.bar.displayMode = mode;
|
||||
}
|
||||
}
|
||||
function setPosition(position: string, screen: string) {
|
||||
var valid = position === "top" || position === "bottom" || position === "left" || position === "right";
|
||||
if (!valid) {
|
||||
Logger.w("IPC", "Invalid bar position: " + position + ". Valid: top, bottom, left, right");
|
||||
return;
|
||||
}
|
||||
if (!screen || screen === "all") {
|
||||
Settings.data.bar.position = position;
|
||||
} else {
|
||||
Settings.setScreenOverride(screen, "position", position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings IPC helpers (outside IpcHandler to avoid QVariant IPC warnings)
|
||||
|
||||
Reference in New Issue
Block a user