let plasma = getApiVersion(1); let allDesktops = desktops(); for (i=0;i maximumWidth) { panel.alignment = "center"; panel.minimumLength = maximumWidth; panel.maximumLength = maximumWidth; } } // For an Icons-Only Task Manager on the bottom, *3 is too much, *2 is too little // Round down to next highest even number since the Panel size widget only displays // even numbers panel.height = Math.floor(gridUnit * 2); panel.hiding = "none"; /*spacer for center view*/ // let max_width = 0; // let max_height = 0; // // for (count = 0; count < screenCount; count++) { // geo = screenGeometry(count); // if (geo.width > max_width) { // max_width = geo.width; // } // // if (geo.height > max_height) { // max_height = geo.height; // } // } // // let aspect_ratio = max_width / max_height; let aspect_ratio = geo.width / geo.height; if (aspect_ratio > 1.8) { panel.addWidget("org.kde.plasma.panelspacer"); } /*App Launcher*/ let baseApps = [ "melawy-welcome.desktop", "systemsettings.desktop", "pamac.desktop", "org.kde.dolphin.desktop", "org.kde.konsole.desktop", "org.kde.kcalc.desktop", "org.kde.kate.desktop" ]; let addApps = [ ["code.desktop", "com.visualstudio.code.desktop"], ["org.telegram.desktop.desktop", "org.telegram.desktop.desktop"], ["discord.desktop", "com.discordapp.Discord.desktop"], ["Zoom.desktop", "us.zoom.Zoom.desktop"], ["firefox-developer-edition.desktop", "firefox-developer-edition.desktop"], ["firefox.desktop", "org.mozilla.firefox.desktop"], ["brave-browser.desktop", "com.brave.Browser.desktop"], ["google-chrome.desktop", "com.google.Chrome.desktop"] ]; let applications = ''; baseApps.forEach((i) => { if (applicationExists(i)) { applications += i + ','; } }); addApps.forEach((i) => { if (applicationExists(i[0])) { applications += i[0] + ','; } else if (applicationExists(i[1])) { applications += i[1] + ','; } }); applications = applications.substring(0, applications.length - 1).split(','); //start_menu = panel.addWidget("org.kde.plasma.kickoff"); start_menu = panel.addWidget("com.github.adhec.Menu11"); start_menu.PreloadWeight = 100; start_menu.popupHeight = 720; start_menu.popupWidth =1000; start_menu.currentConfigGroup = ["General"] start_menu.writeConfig("favoritesPortedToKAstats", "true"); start_menu.writeConfig("icon", "start-here-kde"); start_menu.writeConfig("showActionButtonCaptions", "false"); //start_menu.writeConfig("systemFavorites", "suspend\\,hibernate\\,reboot\\,shutdown"); //start_menu.writeConfig("systemFavorites", "shutdown"); start_menu.writeConfig("systemFavorites", ""); start_menu.writeConfig("favorites", `${applications}`); start_menu.writeConfig("appDescription", "hidden"); start_menu.writeConfig("appListWidth", "400"); start_menu.writeConfig("compactMode", "true"); start_menu.writeConfig("defaultAppListView", "TilesOnly"); start_menu.writeConfig("defaultTileColor", "#e4606060"); start_menu.writeConfig("defaultTileGradient", "true"); start_menu.writeConfig("favGridCols", "6"); start_menu.writeConfig("numberRows", "5"); start_menu.writeConfig("floating", "true"); start_menu.writeConfig("fullscreen", "true"); start_menu.writeConfig("groupLabelAlignment", "center"); start_menu.writeConfig("menuItemHeight", "24"); start_menu.writeConfig("numRecentApps", "10"); start_menu.writeConfig("popupHeight", "700"); start_menu.writeConfig("searchFieldFollowsTheme", "true"); start_menu.writeConfig("searchFieldHeight", "36"); start_menu.writeConfig("searchResultsMerged", "false"); start_menu.writeConfig("sidebarButtonSize", "36"); start_menu.writeConfig("sidebarFollowsTheme", "true"); start_menu.writeConfig("sidebarIconSize", "24"); start_menu.writeConfig("tileLabelAlignment", "center"); // 0 = Auto, 1 = Center, 2 = Center Bottom if (aspect_ratio > 1.8) { start_menu.writeConfig("displayPosition", "2"); } else { start_menu.writeConfig("displayPosition", "0"); } /*Desktops button*/ //panel.addWidget("org.kde.plasma.pager"); panel.addWidget("com.himdek.kde.plasma.overview"); panel.addWidget("org.kde.plasma.icontasks"); panel.addWidget("org.kde.plasma.panelspacer"); /* Next up is determining whether to add the Input Method Panel * widget to the panel or not. This is done based on whether * the system locale's language id is a member of the following * white list of languages which are known to pull in one of * our supported IME backends when chosen during installation * of common distributions. */ let langIds = ["as", // Assamese "bn", // Bengali "bo", // Tibetan "brx", // Bodo "doi", // Dogri "gu", // Gujarati "hi", // Hindi "ja", // Japanese "kn", // Kannada "ko", // Korean "kok", // Konkani "ks", // Kashmiri "lep", // Lepcha "mai", // Maithili "ml", // Malayalam "mni", // Manipuri "mr", // Marathi "ne", // Nepali "or", // Odia "pa", // Punjabi "sa", // Sanskrit "sat", // Santali "sd", // Sindhi "si", // Sinhala "ta", // Tamil "te", // Telugu "th", // Thai "ur", // Urdu "vi", // Vietnamese "zh_CN", // Simplified Chinese "zh_TW"]; // Traditional Chinese if (langIds.indexOf(languageId) != -1) { panel.addWidget("org.kde.plasma.kimpanel"); } function arrayItemRemove(arr, value) { return arr.filter(function(elem){ return elem != value; }); } /* systemtray */ let systrayWidget = panel.addWidget("org.kde.plasma.systemtray"); let systemtrayId = systrayWidget.readConfig("SystrayContainmentId"); let systray = desktopById(systemtrayId); systray.currentConfigGroup = ["General"]; let extraItems = systray.readConfig("extraItems").split(","); extraItems = arrayItemRemove(extraItems, "org.kde.plasma.notifications"); systray.writeConfig("extraItems", extraItems); systray.writeConfig("iconSpacing", 2); // systray.writeConfig("shownItems", "org.kde.plasma.mediacontroller,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.weather,org.kde.plasma.battery"); /* Icons configuration Dolphin */ const IconsStatic_dolphin = ConfigFile('dolphinrc'); IconsStatic_dolphin.group = 'KFileDialog Settings'; IconsStatic_dolphin.writeEntry('Places Icons Static Size', 16); const PlacesPanel = ConfigFile('dolphinrc'); PlacesPanel.group = 'PlacesPanel'; PlacesPanel.writeEntry('IconSize', 16); /******************************/ /*Clock*/ panel_clock = panel.addWidget("org.kde.plasma.digitalclock"); panel_clock.currentConfigGroup = ["Appearance"]; panel_clock.writeConfig("fontSize", "12"); panel_clock.writeConfig("autoFontAndSize", "true"); panel_clock.writeConfig("showSeconds", "Always"); /*Notification*/ panel.addWidget("org.kde.plasma.notifications"); /*Hide all windows*/ // panel.addWidget("org.kde.plasma.showdesktop"); win7showdesktop = panel.addWidget("org.kde.plasma.win7showdesktop"); win7showdesktop.currentConfigGroup = ["General"]; win7showdesktop.writeConfig("edgeColor", "#66888888"); win7showdesktop.writeConfig("hoveredColor", "#66777777"); win7showdesktop.writeConfig("pressedColor", "#66555555"); win7showdesktop.writeConfig("size", "7"); /* accent color config*/ ColorAccetFile = ConfigFile("kdeglobals"); ColorAccetFile.group = "General"; ColorAccetFile.deleteEntry("AccentColor"); ColorAccetFile.deleteEntry("LastUsedCustomAccentColor"); ColorAccetFile.writeEntry("accentColorFromWallpaper", "true"); /* widgetStyle config*/ WidgetStyleFile = ConfigFile("kdeglobals"); WidgetStyleFile.group = "KDE"; WidgetStyleFile.writeEntry("widgetStyle", "Klassy"); /* Buttons of aurorae */ Buttons = ConfigFile("kwinrc"); Buttons.group = "org.kde.kdecoration2"; Buttons.writeEntry("ButtonsOnLeft", ""); Buttons.writeEntry("ButtonsOnRight", "IAX"); /* Decorator of aurorae */ Decorator = ConfigFile("kwinrc"); Decorator.group = "org.kde.kdecoration2"; Decorator.writeEntry("BorderSize", "Normal"); Decorator.writeEntry("BorderSizeAuto", "false"); Decorator.writeEntry("library", "org.kde.klassy"); Decorator.writeEntry("theme", "Klassy"); /* Plugins of aurorae */ Plugins = ConfigFile("kwinrc"); Plugins.group = "Plugins"; Plugins.writeEntry("blurEnabled", "true"); Plugins.writeEntry("contrastEnabled", "true"); Plugins.writeEntry("cubeEnabled", "true"); Plugins.writeEntry("desktopchangeosdEnabled", "true"); Plugins.writeEntry("diminactiveEnabled", "true"); Plugins.writeEntry("dimscreenEnabled", "true"); Plugins.writeEntry("fadedesktopEnabled", "true"); let kinetic = true; if (kinetic) { Plugins.writeEntry("kinetic_maximizeEnabled", "true"); Plugins.writeEntry("maximizeEnabled", "false"); Plugins.writeEntry("kinetic_fadingpopupsEnabled", "true"); Plugins.writeEntry("fadingpopupsEnabled", "false"); Plugins.writeEntry("kinetic_scaleEnabled", "true"); Plugins.writeEntry("scaleEnabled", "false"); Plugins.writeEntry("kinetic_squashEnabled", "true"); Plugins.writeEntry("squashEnabled", "false"); } else { Plugins.writeEntry("kinetic_maximizeEnabled", "false"); Plugins.writeEntry("maximizeEnabled", "true"); Plugins.writeEntry("kinetic_fadingpopupsEnabled", "false"); Plugins.writeEntry("fadingpopupsEnabled", "true"); Plugins.writeEntry("kinetic_scaleEnabled", "false"); Plugins.writeEntry("scaleEnabled", "true"); Plugins.writeEntry("kinetic_squashEnabled", "false"); Plugins.writeEntry("squashEnabled", "true"); } Plugins.writeEntry("kwin4_effect_cornersshaderEnabled", "true"); Plugins.writeEntry("kwin4_effect_fadedesktopEnabled", "true"); Plugins.writeEntry("kwin4_effect_shapecornersEnabled", "true"); Plugins.writeEntry("kwin4_effect_translucencyEnabled", "true"); Plugins.writeEntry("kwin_effect_lightlyshadersEnabled", "false"); Plugins.writeEntry("presentwindowsEnabled", "false"); Plugins.writeEntry("slideEnabled", "false"); Plugins.writeEntry("translucencyEnabled", "true"); /* Effect-overview */ Overview = ConfigFile("kwinrc"); Overview.group = "Effect-overview"; Overview.writeEntry("BorderActivate", "9"); /* Effect-translucency */ Translucency = ConfigFile("kwinrc"); Translucency.group = "Effect-translucency"; Translucency.writeEntry("Inactive", "95"); Translucency.writeEntry("MoveResize", "85"); /* PrimaryOutline */ PrimaryOutline = ConfigFile("kwinrc"); PrimaryOutline.group = "PrimaryOutline"; PrimaryOutline.writeEntry("InactiveOutlineColor", "80,80,80"); PrimaryOutline.writeEntry("OutlineColor", "80,80,80"); /* Windows of aurorae */ Windows = ConfigFile("kwinrc"); Windows.group = "Windows"; Windows.writeEntry("BorderlessMaximizedWindows", "false"); // plasma.loadSerializedLayout(layout);