function addLauncher(icontasks, applicationDesktop, applicationWmClass) { icontasks.currentConfigGroup = new Array("Launchers"); var itemsLaunchers = icontasks.readConfig("Items", ""); if (itemsLaunchers !== "") { itemsLaunchers += ","; } itemsLaunchers += "file://" + applicationPath(applicationDesktop) + "?wmClass=" + applicationWmClass; icontasks.writeConfig("Items", itemsLaunchers); } var panel = new Panel; if (panelIds.length == 1) { // we are the only panel, so set the location for the user panel.location = 'bottom'; } // we need 40 as minimal size to not have lockout applet in one line but in 2 lines panel.height = 40; var w_simplelauncher = panel.addWidget("simplelauncher"); w_simplelauncher.writeConfig("icon", "mgabutton"); w_simplelauncher.writeConfig("format", "Name"); w_simplelauncher.writeConfig("showMenuTitles", "true"); w_simplelauncher.writeConfig("views", "RecentlyUsedApplications,Applications,Favorites,RecentlyUsed,RunCommand,Leave"); w_simplelauncher.reloadConfig(); panel.addWidget("showdesktop"); panel.addWidget("org.kde.showActivityManager"); panel.addWidget("pager"); var w_icontasks = panel.addWidget("icontasks"); w_icontasks.writeConfig("showOnlyCurrentActivity","true"); w_icontasks.writeConfig("showOnlyCurrentDesktop","false"); w_icontasks.writeConfig("showOnlyCurrentScreen","true"); w_icontasks.writeConfig("mediaButtons","true"); w_icontasks.writeConfig("showProgress","true"); w_icontasks.writeConfig("showSeparator","0"); w_icontasks.writeConfig("launcherIcons","true"); w_icontasks.writeConfig("unity","false"); w_icontasks.writeConfig("style","1"); addLauncher(w_icontasks, "dolphin.desktop", "Dolphin"); addLauncher(w_icontasks, "systemsettings.desktop", "Systemsettings"); addLauncher(w_icontasks, "mageia-drakconf.desktop", "Drakconf.real"); addLauncher(w_icontasks, "firefox.desktop", "Firefox"); w_icontasks.reloadConfig(); var w_systray = panel.addWidget("systemtray"); var w_clock = panel.addWidget("digital-clock"); w_clock.writeConfig("displayHolidays","false"); w_clock.writeConfig("displayEvents","false"); w_clock.reloadConfig(); panel.addWidget("lockout"); var biggestId = 0; var tmpBiggestId = 0; for (var i in activityIds) { var activity = activityById(activityIds[i]); if (activity.widgetIds.length > 0) { tmpBiggestId = Math.max.apply(null, activity.widgetIds); if (tmpBiggestId > biggestId) { biggestId = tmpBiggestId; } } } for (var i in panelIds) { var panel = panelById(panelIds[i]); if (panel.widgetIds.length > 0) { tmpBiggestId = Math.max.apply(null, panel.widgetIds); if (tmpBiggestId > biggestId) { biggestId = tmpBiggestId; } } } w_systray.currentConfigGroup = new Array('Applets', biggestId+1); w_systray.writeConfig('plugin', 'org.kde.telepathy-presence'); w_systray.currentConfigGroup = new Array(); w_systray.reloadConfig(); sleep(2);