Q: PlasmaDesktopScripting : Sizing widget PopUps in Panels, best methods of handling some tasks

Stephen Dowdy sdowdy at ucar.edu
Wed Jun 5 16:35:54 UTC 2013


Aaron J. Seigo wrote, On 06/05/2013 06:06 AM:
> On Tuesday, June 4, 2013 20:38:45 Stephen Dowdy wrote:

>> I find the default Popup size displaying the calendar and "events/holidays" to be too small (both height and width). writeConfig() and writeGlobalConfig() create Group labels not used for the PopUp group labels. (addition of [Configuration] and [AppletGlobals]' that aren't in the '[PopupApplet]' label)
>> 
>> Any way to do that in the plasma-desktop/init/* + plasma/layout-templates/* toolkit?
> 
> yes.. it is not well documented, but you can do it with:
> 
> clock.currentConfigGroup = ['PopupApplet']; clock.writeEntry('DialogHeight', 228); clock.writeEntry('DialogWidth', 408);

Hrmm, i get:

  Error: TypeError: Result of expression 'clock.writeEntry' [undefined] is not a function

That's for KDE 4.8.4 (Debian Wheezy)
applicationVersion=0.4
platformVersion=4.8.4(4.8.4)
scriptingVersion=4


>> There seems to be no generalized "kwriteconfig/kreadconfig" type interface in PDS (which would be great), so best i can guess i'd
> 
> no, there isn't, and yes, it would be nice.
(from following e-mail...)
    > no, there isn't, and yes, it would be nice.
    i've added this to the plasma desktop scripting for 4.11. enjoy

Zow! that was fast!  Unfortunately (for me), we deploy Debian,
so i'll see that in 2 years ;}  It's still something that is
a powerful/helpful addition, so thanks for adding it.

In general, i guess i still have to figure out the best place
to wedge in auxiliary configuration bits that aren't handled
in the plasmascript arena to create the default-site/custom
activity+panel layouts (and other configuration file bits).

'startkde' refers to what appears to be a totally undocumented
  (# see kstartupconfig source for usage (sigh) )
command 'kstartupconfig4' which appears to be a failsafe
baseline/startup setup (as the conf files seem to be hardcode
force-generated every time in 'startkde')
So, that seems to be less designed for site-customization and
more for "stability" assurance?


    libpath=`kde4-config --path lib | tr : '\n'`
    for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do
      for file in "$prefix"*.sh; do
        test -r "$file" && . "$file"
      done
    done

That looks like i could put stuff in /usr/env/foo.sh to check for FirstRun
and configure, but that seems pretty ugly.

I'm also reluctant to modify 'startkde'

Perhaps a .desktop file in /etc/xdg/autostart with an Exec= to run a script?
(that's still pretty ugly)

--stephen


More information about the Plasma-devel mailing list