////////function remove in case of error of first remove :S function remove() { for (i in panelIds) { panelById(panelIds[i]).remove() } } ////////////////////////////////////////////////////////// /////function remove standard/////////////////////////////// function RemoveOldPanels() { for (i in panelIds) { // panelById(panelIds[i]).remove() p = panelById(panelIds[i]); if (typeof p === "undefined") { print("E: Couldn't find first panel"); remove() //load the remove function in case of problems } else { panelById(panelIds[i]).remove() } } } //RemoveOldPanels() //load the function ////////////////////////////////////////////////////////// function mageiapanel(){ var panel = new Panel if (panelIds.length == 1) { // we are the only panel, so set the location for the user panel.location = 'bottom' } panel.height = screenGeometry(panel.screen).height > 1024 ? 35 : 27 panel.addWidget("simplelauncher") panel.addWidget("showdesktop") pager = panel.addWidget("pager"); pager.writeGlobalConfig("rows", "1"); var icontasks = panel.addWidget("icontasks") systray = panel.addWidget("systemtray") panel.addWidget("digital-clock") icontasks.currentConfigGroup = new Array("Launchers") icontasks.writeConfig("Items","file:///usr/share/applications/mageia-drakconf.desktop,file:///usr/share/applications/kde4/systemsettings.desktop") icontasks.writeConfig("browser", "preferred://browser, , , ") icontasks.writeConfig("filemanager", "preferred://filemanager, , , ") icontasks.writeConfig("showOnlyCurrentActivity","false"); icontasks.writeConfig("showOnlyCurrentDesktop","false"); icontasks.writeConfig("showOnlyCurrentScreen","false"); icontasks.writeConfig("style","1"); } mageiapanel()