[Help js Scripting Help customize default plasma-desktop

Helmer Teles helmer.teles at gmail.com
Wed Jun 6 11:39:31 UTC 2012


Hello Guys,

I've already asked this at kde forums at the following link 
http://forum.kde.org/viewtopic.php?f=67&t=102585 


Given the following plasma init script to create a very basic and kiosked KDE4 
Enviroment, how can i disable unlock widgets and activity actions from the 
ActionPlugins ( right button Popup Menu?
I already know that i have to write the following keys :

[ActionPlugins][RightButton;NoModifier]
_add panel=true
_context=true
_lock_screen=true
_logout=true
_run_command=false
_sep1=true
_sep2=true
_sep3=true
_wallpaper=true
add sibling containment=false
add widgets=false
configure=true
configure shortcuts=false
lock widgets=false
manage activities=false
remove=true

Also i dont want to put [$i] at the plasma-desktop-appletsrc file because i 
have to delete this file every logon because of this problem -
> viewtopic.php?f=67&t=102286
So, at every logon, i have a script that deletes ~/.kde/share/config/plasma-
desktop-appletsrc


This is my 00-defaultLayout.js at share/apps/plasma-desktop/init

var activity = new Activity("folderview");

activity.writeConfig("ActionPluginsSource", "Local");
activity.writeConfig("MidButton;NoModifier", "");
activity.writeConfig("RightButton;NoModifier", "");
activity.writeConfig("wheel:Vertical;NoModifier", "");
activity.writeConfig("immutability", "2");
activity.writeConfig("locked", "true");

var panel = new Panel("panel");
panel.location = "bottom";
panel.writeConfig("ActionPluginsSource", "Local");
panel.writeConfig("MidButton;NoModifier", "");
panel.writeConfig("RightButton;NoModifier", "");
panel.writeConfig("immutability", "2");

var launcher = panel.addWidget("simplelauncher");
launcher.writeConfig("format", "Description");
launcher.writeConfig("showMenuTitles", "true");
launcher.writeConfig("maxRecentApps", "3");
launcher.writeConfig("immutability", "2");

launcher.writeConfig("views", 
"RecentlyUsedApplications,RecentlyUsedDocuments,Applications,Favorites,LockScreen,Logout");
launcher.writeConfig("icon", "java");

panel.addWidget("showdesktop");

//var accesso = panel.addWidget("quickaccess");
//acesso.writeConfig=("url", "Desktop://");
//acesso.writeConfig=("icon", "folder-bookmark");
//acesso.writeConfig=("iconSize", "22);

panel.addWidget("icontasks");

systray = panel.addWidget("systemtray");
systray.writeConfig("DefaultAppletsAdded", "true");
systray.writeConfig("Share", "false");
systray.writeConfig("ShowApplicationStatus", "true");
systray.writeConfig("ShowCommunications", "false");
systray.writeConfig("ShowHardware", "true");
systray.writeConfig("ShowSystemServices", "false");
systray.writeConfig("ShowUnknown", "false");
//systray.writeConfig("alwaysShown", "'Applet' de Impressoras");
systray.writeConfig("hidden", "notifier,notifications");

clock = panel.addWidget("digital-clock");
clock.writeConfig("showDate", "true");
clock.writeConfig("displayEvents", "false");
clock.writeConfig("dateStyle", "4");
clock.writeConfig("displayHolidays", "true");
clock.writeConfig("holidaysRegions", "pt_pt");
clock.writeConfig("holidaysRegionsDaysOff", "pt_pt");

Xiqueiro = panel.addWidget("trash");
Xiqueiro.writeConfig("immutability", "2");

ByeBye = activity.addWidget("py-cashew");
ByeBye.writeConfig("geometry", "396,161,200,200");
ByeBye.writeConfig("immutability", "2");

Thanks for any help guys,
just want to script the ActionPlugins rightbutton, but i can't seem to manage 
the way to do it.

kind regards,
-- 
hteles

eM at il   : helmer dot teles at google mail servers
Web Page: http://hteles.wordpress.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120606/973a6f47/attachment.html>


More information about the Plasma-devel mailing list