From 98fccfb6f074058ae1cdf0bc207bcc0aad03be4d Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Tue, 21 Nov 2023 11:37:29 +0500 Subject: [PATCH] Update --- .../contents/layout.js | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js b/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js index fa9c091..2b98b2f 100644 --- a/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js +++ b/melawy-kde-theme/usr/share/plasma/layout-templates/org.github.Melawy.desktop.MelawyPanel/contents/layout.js @@ -128,15 +128,24 @@ if (langIds.indexOf(languageId) != -1) { panel.addWidget("org.kde.plasma.kimpanel"); } +function arrayItemRemove(arr, value) { + + return arr.filter(function(elem){ + return elem != value; + }); +} + /*systemtray*/ -var systraprev = panel.addWidget("org.kde.plasma.systemtray"); -var SystrayContainmentId = systraprev.readConfig("SystrayContainmentId"); -const systray = desktopById(SystrayContainmentId); +let systrayWidget = panel.addWidget("org.kde.plasma.systemtray"); +let systemtrayId = systrayWidget.readConfig("SystrayContainmentId"); +let systray = desktopById(systemtrayId); systray.currentConfigGroup = ["General"]; -// let ListTrays = systray.readConfig("extraItems"); -// let ListTrays2 = ListTrays.replace(",org.kde.plasma.notifications", ""); -// systray.writeConfig("extraItems", ListTrays2); +let extraItems = systray.readConfig("extraItems").split(","); +extraItems = arrayItemRemove(extraItems, "org.kde.plasma.notifications"); +systray.writeConfig("extraItems", extraItems); systray.writeConfig("iconSpacing", 2); +systray.reloadConfig(); + // systray.writeConfig("shownItems", "org.kde.plasma.mediacontroller,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.weather,org.kde.plasma.battery"); /*Cambiando configuracion Dolphin*/