[Help js Scripting Help customize default plasma-desktop

Helmer Teles helmer.teles at gmail.com
Wed Jun 6 16:01:49 UTC 2012




On Wednesday 06 June 2012 13:59:14 Aaron J. Seigo wrote:
> On Wednesday, June 6, 2012 12:39:31 Helmer Teles wrote:
> > 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 -
> 
> well, that's the first step: dealing with this issue since that's a
> significant problem obviously. and i don't have the ability to troubleshoot
> this as i have no such setup here to test with (nor can i set up one just
> for this).
> 
The reason i have to delete the file is because of when people login at a 
diferent location with a diferent resolution the panel will never grow to a 
wider width. 
Take for instance the following example script located 
@share/kde4/apps/plasma-desktop/updates/resizepanel.js :

sleep(1000)
panel = panelById(panelIds[0]) 
panel.length = screenGeometry(panel.screen).width  /2
panel.height = 40 
panel.alignment = "center"
This script is run only once, and if you have "roaming" users with diferent 
systems/resolutions your panel will eventually be left at the bottom left with 
a smaller with as the smaller resolution. 


> what i would need to know is what the values are for these functions:
> 
> http://techbase.kde.org/KDE_System_Administration/PlasmaDesktopScripting#Scr
> een_Geometry
> 
> to find out, open krunner, type "desktop console" and this will bring up the
> interactive scripting window. try experimenting with the screen count and
> geometry functions on a running system and let us know what you find.
> 
I guess that's a bit basic but these are my values running the following js 
and values seem to be okay.

sc = screenCount
sh = screenGeometry(sc.screen).height
sw = screenGeometry(sc.screen).width

print( "screenCount = " + sc )
print( "Screen Width = "  + sw )
print( "Screen Height = "  + sh )

---

Executing script at 2012-06-06 16:40

screenCount = 1
Screen Width = 1680
Screen Height = 1050

Runtime: 2ms



> p.s. sorry for not responding to your first email; i've had a draft reply
> open since the day you posted but have been busy with other things.

No problem, i guess you are a busy guy 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120606/9380fad3/attachment-0001.html>


More information about the Plasma-devel mailing list