add back panels if they disappeared

This commit is contained in:
Marco Martin 2021-01-27 14:20:15 +01:00
parent 2e495f72cd
commit f19f629b4b

View file

@ -0,0 +1,20 @@
let topFound = false
let bottomFound = false
for (let i in panels()) {
print(panels()[i].type)
if (panels()[i].type === "org.kde.phone.panel") {
topFound = true;
} else if (panels()[i].type === "org.kde.phone.taskpanel") {
topFound = true;
}
}
if (!topFound) {
let topPanel = new Panel("org.kde.phone.panel")
topPanel.location = "Top";
}
if (!bottomFound) {
let topPanel = new Panel("org.kde.phone.taskpanel")
topPanel.location = "Bottom";
}