Best Python code snippet using tox_python
org.openmandriva.plasma.desktop.defaultPanel-layout.js
Source:org.openmandriva.plasma.desktop.defaultPanel-layout.js
1// Default Plasma panel for OpenMandriva2// Author: Tomasz PaweŠGajc (tpgxyz@gmail.com) 2013, 2014, 2015, 20163// Bernhard Rosenkränzer <bero@lindev.ch> 20204// Licensed under GPLv2+5print("Loading OpenMandriva Plasma panel configuration")6// remove already existing old panels7function removeOldPanels()8{9 while(panelIds.length)10 panelById(panelIds[0]).remove()11}12// remove already existing other panels13removeOldPanels()14// start new panel15var panel = new Panel16if (panelIds.length == 1) {17 // we are the only panel, so set the location for the user18 panel.location = "bottom";19}20// let's calculate desired panel height based on scren's DPI21panel.height = gridUnit * 322panel.alignment = "left";23panel.hiding = "none";24// by default kicker is used, options are kickoff and kickerdash25var launcher = panel.addWidget("org.kde.plasma.kicker")26launcher.currentConfigGroup = ["Shortcuts"]27launcher.writeConfig("global", "Alt+F1")28launcher.currentConfigGroup = ["General"]29launcher.writeConfig("favorites", "preferred://browser,org.kde.kmail.desktop,org.kde.konversation.desktop,kcm_kdeconnect.desktop,org.kde.dolphin.desktop,org.kde.kate.desktop,org.kde.konsole.desktop,systemsettings.desktop")30launcher.writeConfig("limitDepth", false)31launcher.writeConfig("useExtraRunners", true)32launcher.writeConfig("alignResultsToBottom", true)33launcher.writeConfig("appNameFormat", "3")34launcher.writeConfig("showRecentContacts", "true")35launcher.writeConfig("showRecentApps", "true")36launcher.writeConfig("showRecentDocs", "true")37launcher.writeConfig("appNameFormat", "0")38var tasks = panel.addWidget("org.kde.plasma.taskmanager")39tasks.currentConfigGroup = ["General"]40tasks.writeConfig("forceStripes","true")41tasks.writeConfig("middleClickAction", "Close")42tasks.writeConfig("onlyGroupWhenFull","true")43tasks.writeConfig("groupingStrategy","1")44tasks.writeConfig("highlightWindows","false")45tasks.writeConfig("maxStripes","2")46tasks.writeConfig("showOnlyCurrentDesktop","true")47tasks.writeConfig("showOnlyCurrentScreen","false")48tasks.writeConfig("showOnlyMinimized","false")49tasks.writeConfig("showToolTips","true")50tasks.writeConfig("sortingStrategy","2")51var pager = panel.addWidget("org.kde.plasma.pager")52pager.currentConfigGroup = ["General"]53pager.writeConfig("showWindowIcons","true")54pager.writeConfig("displayedText", "Number")55/* Next up is determining whether to add the Input Method Panel56 * widget to the panel or not. This is done based on whether57 * the system locale's language id is a member of the following58 * white list of languages which are known to pull in one of59 * our supported IME backends when chosen during installation60 * of common distributions. */61var langIds = ["as", // Assamese62 "bn", // Bengali63 "bo", // Tibetan64 "brx", // Bodo65 "doi", // Dogri66 "gu", // Gujarati67 "hi", // Hindi68 "ja", // Japanese69 "kn", // Kannada70 "ko", // Korean71 "kok", // Konkani72 "ks", // Kashmiri73 "lep", // Lepcha74 "mai", // Maithili75 "ml", // Malayalam76 "mni", // Manipuri77 "mr", // Marathi78 "ne", // Nepali79 "or", // Odia80 "pa", // Punjabi81 "sa", // Sanskrit82 "sat", // Santali83 "sd", // Sindhi84 "si", // Sinhala85 "ta", // Tamil86 "te", // Telugu87 "th", // Thai88 "ur", // Urdu89 "vi", // Vietnamese90 "zh_CN", // Simplified Chinese91 "zh_TW"] // Traditional Chinese92if (langIds.indexOf(languageId) != -1) {93 panel.addWidget("org.kde.plasma.kimpanel");94}95var systray = panel.addWidget("org.kde.plasma.systemtray")96systray.currentConfigGroup = ["General"]97systray.writeConfig("communicationsShow", "true")98systray.writeConfig("applicationStatusShown","true")99systray.writeConfig("ShowCommunications","true")100systray.writeConfig("systemServicesShown","true")101systray.writeConfig("hardwareControlShown","true")102systray.writeConfig("miscellaneousShown","true")103systray.writeConfig("extraItems", "org.kde.plasma.devicenotifier,org.kde.plasma.notifications,org.kde.plasma.bluetooth,org.kde.plasma.battery,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.muonnotifier,org.kde.plasma.clipboard")104systray.writeConfig("hiddenItems", "hp-systray,python3.4m")105systray.writeConfig("knownItems", "org.kde.plasma.notifications,org.kde.plasma.bluetooth,org.kde.plasma.clipboard,org.kde.plasma.battery,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.mediacontroller,org.kde.muonnotifier,org.kde.plasma.devicenotifier,org.kde.plasma.clipboard")106var clock = panel.addWidget("org.kde.plasma.digitalclock")107clock.currentConfigGroup = ["Appearance"]108clock.writeConfig("showDate","true")109clock.writeConfig("showWeekNumbers","true")110clock.writeConfig("dateFormat", "isoDate")111clock.writeConfig("use24hFormat", "2")112clock.reloadConfig()113panel.addWidget("org.kde.plasma.trash")114sleep(0.5)115panel.reloadConfig()116// if set to true it is not possible to remove panel :)...
org.openmandriva.plasma.desktop.globalMenuPanel-layout.js
Source:org.openmandriva.plasma.desktop.globalMenuPanel-layout.js
1// Plasma panel for global menu configurations for OpenMandriva2// Author: Bernhard Rosenkränzer <bero@lindev.ch>, (C) 20203// Licensed under GPLv3+4// Partially based on default panel config5print("Loading OpenMandriva Plasma panel configuration")6// remove already existing old panels7function removeOldPanels()8{9 while(panelIds.length)10 panelById(panelIds[0]).remove()11}12// remove already existing other panels13removeOldPanels()14// start new panel15var panel = new Panel16panel.location = "top";17// let's calculate desired panel height based on screen's DPI18panel.height = gridUnit*1.519panel.alignment = "left"20panel.hiding = "none"21// by default kicker is used, options are kickoff and kickerdash22var launcher = panel.addWidget("org.kde.plasma.kicker")23launcher.currentConfigGroup = ["Shortcuts"]24launcher.writeConfig("global", "Alt+F1")25launcher.currentConfigGroup = ["General"]26launcher.writeConfig("favorites", "preferred://browser,org.kde.kmail.desktop,org.kde.konversation.desktop,kcm_kdeconnect.desktop,org.kde.dolphin.desktop,org.kde.kate.desktop,org.kde.konsole.desktop,systemsettings.desktop")27launcher.writeConfig("limitDepth", false)28launcher.writeConfig("useExtraRunners", true)29launcher.writeConfig("alignResultsToBottom", true)30launcher.writeConfig("appNameFormat", "3")31launcher.writeConfig("showRecentContacts", "true")32launcher.writeConfig("showRecentApps", "true")33launcher.writeConfig("showRecentDocs", "true")34launcher.writeConfig("appNameFormat", "0")35panel.addWidget("org.kde.plasma.appmenu")36panel.addWidget("org.kde.plasma.panelspacer")37/* Next up is determining whether to add the Input Method Panel38 * widget to the panel or not. This is done based on whether39 * the system locale's language id is a member of the following40 * white list of languages which are known to pull in one of41 * our supported IME backends when chosen during installation42 * of common distributions. */43var langIds = ["as", // Assamese44 "bn", // Bengali45 "bo", // Tibetan46 "brx", // Bodo47 "doi", // Dogri48 "gu", // Gujarati49 "hi", // Hindi50 "ja", // Japanese51 "kn", // Kannada52 "ko", // Korean53 "kok", // Konkani54 "ks", // Kashmiri55 "lep", // Lepcha56 "mai", // Maithili57 "ml", // Malayalam58 "mni", // Manipuri59 "mr", // Marathi60 "ne", // Nepali61 "or", // Odia62 "pa", // Punjabi63 "sa", // Sanskrit64 "sat", // Santali65 "sd", // Sindhi66 "si", // Sinhala67 "ta", // Tamil68 "te", // Telugu69 "th", // Thai70 "ur", // Urdu71 "vi", // Vietnamese72 "zh_CN", // Simplified Chinese73 "zh_TW"] // Traditional Chinese74if (langIds.indexOf(languageId) != -1) {75 panel.addWidget("org.kde.plasma.kimpanel");76}77var systray = panel.addWidget("org.kde.plasma.systemtray")78systray.currentConfigGroup = ["General"]79systray.writeConfig("communicationsShow", "true")80systray.writeConfig("applicationStatusShown","true")81systray.writeConfig("ShowCommunications","true")82systray.writeConfig("systemServicesShown","true")83systray.writeConfig("hardwareControlShown","true")84systray.writeConfig("miscellaneousShown","true")85systray.writeConfig("extraItems", "org.kde.plasma.devicenotifier,org.kde.plasma.notifications,org.kde.plasma.bluetooth,org.kde.plasma.battery,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.muonnotifier,org.kde.plasma.clipboard")86systray.writeConfig("hiddenItems", "hp-systray,python3.4m")87systray.writeConfig("knownItems", "org.kde.plasma.notifications,org.kde.plasma.bluetooth,org.kde.plasma.clipboard,org.kde.plasma.battery,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.mediacontroller,org.kde.muonnotifier,org.kde.plasma.devicenotifier,org.kde.plasma.clipboard")88var clock = panel.addWidget("org.kde.plasma.digitalclock")89clock.currentConfigGroup = ["Appearance"]90clock.writeConfig("showDate","false")91clock.writeConfig("showWeekNumbers","false")92clock.writeConfig("dateFormat", "isoDate")93clock.writeConfig("use24hFormat", "2")94clock.reloadConfig()95sleep(0.5)96panel.reloadConfig()97// if set to true it is not possible to remove panel :)...
mosx-panel-light.js
Source:mosx-panel-light.js
1// Remove all existing panels 2for (i in panelIds) {3 panel = panelById(panelIds[i]);4 panel.remove();5};6//Create KOOMPI Panel7var koompi_panel = new Panel();8koompi_panel.location = "top";9koompi_panel.height = 32;10var space1 = koompi_panel.addWidget("org.kde.plasma.panelspacer");11space1.currentConfigGroup = ["General"]12space1.writeConfig("expanding", false);13space1.writeConfig("length", 7);14var menu = koompi_panel.addWidget("org.kde.plasma.umenu");15menu.currentConfigGroup = ["Shortcuts"]16menu.writeConfig("global", "Alt+F1")17var space2 = koompi_panel.addWidget("org.kde.plasma.panelspacer");18space2.currentConfigGroup = ["General"]19space2.writeConfig("expanding", false);20space2.writeConfig("length", 3);21// var all_tasks = koompi_panel.addWidget("org.kde.plasma.icontasks");22// all_tasks.currentConfigGroup = ["General"]23// all_tasks.writeConfig("launchers" ,"file:///usr/share/applications/org.kde.dolphin.desktop,file:///usr/share/applications/firefox.desktop,file:///usr/share/applications/org.kde.konsole.desktop")24var apptitle = koompi_panel.addWidget("org.communia.apptitle");25apptitle.currentConfigGroup = ["General"]26apptitle.writeConfig("noWindowType", "text");27apptitle.writeConfig("noWindowText", "");28apptitle.writeConfig("textType", 1);29apptitle.writeConfig("bold", true);30var space3 = koompi_panel.addWidget("org.kde.plasma.panelspacer");31space3.currentConfigGroup = ["General"]32space3.writeConfig("expanding", false);33space3.writeConfig("length", 5);34koompi_panel.addWidget("org.kde.plasma.appmenu");35var space4 = koompi_panel.addWidget("org.kde.plasma.panelspacer");36// Add system tray37var systray = koompi_panel.addWidget("org.kde.plasma.systemtray")38var systrayContainmentId = systray.readConfig("SystrayContainmentId")39var systrayContainment = desktopById(systrayContainmentId)40systrayContainment.currentConfigGroup = ["General"]41systrayContainment.writeConfig("extraItems","org.kde.plasma.devicenotifier,org.kde.plasma.networkmanagement,org.kde.discovernotifier,org.kde.plasma.diskquota,org.kde.plasma.bluetooth,org.kde.plasma.clipboard,org.kde.plasma.printmanager,org.kde.plasma.battery")42systrayContainment.writeConfig("knownItems", "org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.bluetooth,org.kde.plasma.battery,org.kde.discovernotifier,org.kde.plasma.clipboard,org.kde.plasma.mediacontroller,org.kde.plasma.devicenotifier,org.kde.plasma.notifications,org.kde.plasma.printmanager,org.kde.plasma.notifications,org.kde.kdeconnect")43systrayContainment.writeConfig("hiddenItems","org.kde.plasma.clipboard,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.battery")44koompi_panel.addWidget("org.kde.plasma.bluetooth")45koompi_panel.addWidget("org.kde.plasma.networkmanagement")46koompi_panel.addWidget("org.kde.plasma.volume")47koompi_panel.addWidget("org.kde.plasma.battery")48var space5 = koompi_panel.addWidget("org.kde.plasma.panelspacer");49space5.currentConfigGroup = ["General"]50space5.writeConfig("expanding", false);51space5.writeConfig("length", 5);52var dateviewer = koompi_panel.addWidget("org.kde.plasma.chiliclock");53dateviewer.currentConfigGroup = ["Appearance"];54dateviewer.writeConfig("customDateFormat", "ddd dd/MM/yy");55dateviewer.writeConfig("fixedFont", true);56dateviewer.writeConfig("fontSize", 14);57var space6 = koompi_panel.addWidget("org.kde.plasma.panelspacer");58space6.currentConfigGroup = ["General"]59space6.writeConfig("expanding", false);60space6.writeConfig("length", 10);61var power = koompi_panel.addWidget("org.kde.plasma.lock_logout");62power.currentConfigGroup = ["General"];63power.writeConfig("show_lockScreen", false);64var space7 = koompi_panel.addWidget("org.kde.plasma.panelspacer");65space7.currentConfigGroup = ["General"]66space7.writeConfig("expanding", false);67space7.writeConfig("length", 10);68var show_desktop = koompi_panel.addWidget("org.kde.plasma.win7showdesktop");69show_desktop.currentConfigGroup = ["General"];70show_desktop.writeConfig("size", 5);71var Desktops = desktops(); 72for (i=0;i<Desktops.length;i++) {73 d = Desktops[i];74 d.wallpaperPlugin = "org.kde.image";75 d.currentConfigGroup = Array("Wallpaper",76 "org.kde.image",77 "General");78 d.writeConfig("Image", "file:///usr/share/wallpapers/mosx-light.jpg");...
mosx-panel-dark.js
Source:mosx-panel-dark.js
1// Remove all existing panels 2for (i in panelIds) {3 panel = panelById(panelIds[i]);4 panel.remove();5};6//Create KOOMPI Panel7var koompi_panel = new Panel();8koompi_panel.location = "top";9koompi_panel.height = 32;10var space1 = koompi_panel.addWidget("org.kde.plasma.panelspacer");11space1.currentConfigGroup = ["General"]12space1.writeConfig("expanding", false);13space1.writeConfig("length", 7);14var menu = koompi_panel.addWidget("org.kde.plasma.umenu");15menu.currentConfigGroup = ["Shortcuts"]16menu.writeConfig("global", "Alt+F1")17var space2 = koompi_panel.addWidget("org.kde.plasma.panelspacer");18space2.currentConfigGroup = ["General"]19space2.writeConfig("expanding", false);20space2.writeConfig("length", 3);21// var all_tasks = koompi_panel.addWidget("org.kde.plasma.icontasks");22// all_tasks.currentConfigGroup = ["General"]23// all_tasks.writeConfig("launchers" ,"file:///usr/share/applications/org.kde.dolphin.desktop,file:///usr/share/applications/firefox.desktop,file:///usr/share/applications/org.kde.konsole.desktop")24var apptitle = koompi_panel.addWidget("org.communia.apptitle");25apptitle.currentConfigGroup = ["General"]26apptitle.writeConfig("noWindowType", "text");27apptitle.writeConfig("noWindowText", "");28apptitle.writeConfig("textType", 1);29apptitle.writeConfig("bold", true);30var space3 = koompi_panel.addWidget("org.kde.plasma.panelspacer");31space3.currentConfigGroup = ["General"]32space3.writeConfig("expanding", false);33space3.writeConfig("length", 5);34koompi_panel.addWidget("org.kde.plasma.appmenu");35var space4 = koompi_panel.addWidget("org.kde.plasma.panelspacer");36// Add system tray37var systray = koompi_panel.addWidget("org.kde.plasma.systemtray")38var systrayContainmentId = systray.readConfig("SystrayContainmentId")39var systrayContainment = desktopById(systrayContainmentId)40systrayContainment.currentConfigGroup = ["General"]41systrayContainment.writeConfig("extraItems","org.kde.plasma.devicenotifier,org.kde.plasma.networkmanagement,org.kde.discovernotifier,org.kde.plasma.diskquota,org.kde.plasma.bluetooth,org.kde.plasma.clipboard,org.kde.plasma.printmanager,org.kde.plasma.battery")42systrayContainment.writeConfig("knownItems", "org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.bluetooth,org.kde.plasma.battery,org.kde.discovernotifier,org.kde.plasma.clipboard,org.kde.plasma.mediacontroller,org.kde.plasma.devicenotifier,org.kde.plasma.notifications,org.kde.plasma.printmanager,org.kde.plasma.notifications,org.kde.kdeconnect")43systrayContainment.writeConfig("hiddenItems","org.kde.plasma.clipboard,org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.battery")44koompi_panel.addWidget("org.kde.plasma.bluetooth")45koompi_panel.addWidget("org.kde.plasma.networkmanagement")46koompi_panel.addWidget("org.kde.plasma.volume")47koompi_panel.addWidget("org.kde.plasma.battery")48var space5 = koompi_panel.addWidget("org.kde.plasma.panelspacer");49space5.currentConfigGroup = ["General"]50space5.writeConfig("expanding", false);51space5.writeConfig("length", 5);52var dateviewer = koompi_panel.addWidget("org.kde.plasma.chiliclock");53dateviewer.currentConfigGroup = ["Appearance"];54dateviewer.writeConfig("customDateFormat", "ddd dd/MM/yy");55dateviewer.writeConfig("fixedFont", true);56dateviewer.writeConfig("fontSize", 14);57var space6 = koompi_panel.addWidget("org.kde.plasma.panelspacer");58space6.currentConfigGroup = ["General"]59space6.writeConfig("expanding", false);60space6.writeConfig("length", 10);61var power = koompi_panel.addWidget("org.kde.plasma.lock_logout");62power.currentConfigGroup = ["General"];63power.writeConfig("show_lockScreen", false);64var space7 = koompi_panel.addWidget("org.kde.plasma.panelspacer");65space7.currentConfigGroup = ["General"]66space7.writeConfig("expanding", false);67space7.writeConfig("length", 10);68var show_desktop = koompi_panel.addWidget("org.kde.plasma.win7showdesktop");69show_desktop.currentConfigGroup = ["General"];70show_desktop.writeConfig("size", 5);71var Desktops = desktops(); 72for (i=0;i<Desktops.length;i++) {73 d = Desktops[i];74 d.wallpaperPlugin = "org.kde.image";75 d.currentConfigGroup = Array("Wallpaper",76 "org.kde.image",77 "General");78 d.writeConfig("Image", "file:///usr/share/wallpapers/mosx-dark.jpg");...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!