Re: Set plasma panel default to maximum?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John McMonagle wrote, On 04/09/2012 12:34 PM:
> Setting up kde4 for use with ltsp.
> Running kde 4.4.5 debian squeeze.
> Working on default plasma settings.
> I have the attached plasma-desktop-appletsrc in /etc/kde4.
> File was created with 1024x768 monitor.
> My only problem with it is setting to maximum  width.
> Monitors have  various widths and I want it to be the full width of the 
> monitor.
> I tried changing
> [Containments][3][Configuration]
> maximumSize=1024,28
> minimumSize=1024,28
> to 
> [Containments][3][Configuration]
> #maximumSize=1024,28
> #minimumSize=1024,28

John,

I'm presuming that you know that if a user ran with this initially,
that they'd get a ~/.kde/share/config/plasma-desktop-appletsrc with
the original values and that'd override /etc/kde4/*

The first time plasma runs, it appears to do this automagically,
so i suspect that the user may already have a plasma-desktop-appletsrc
file...

programmatically hacking up the plasma-desktop-appletsrc file, or
even creating a template of it look pretty "iffy" to me due to
the twisty-maze of passages all alike within that framework.

You could use the plasma-desktop javascript engine to collect
runtime info and set the properties of the panel.

I'm thinking that you *might* be able to create a desktop file in
/etc/kde4/Autostart or somesuch that runs after plasma-desktop,
and then sets the panel to full-width.  This would allow plasma-desktop
to set it by default the first time, then allow you to override any
forced size settings.  (being aware of overriding user preferences
if you allow that)

http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/GettingStarted
(see something like the metadata.desktop file to setup something)

Here's the javascript example "manipulatePanel.js" from the KDE Examples
(https://projects.kde.org/projects/kde/kdeexamples)
to resize the plasma-desktop primary task panel:

    [manipulatePanel.js]
    panel = panelById(panelIds[0])
    panel.length = screenGeometry(panel.screen).width / 2
    panel.alignment = "center"
    sleep(1000)
    panel.alignment = "left"
    panel.offset = screenGeometry(panel.screen).width / 5
    panel.height = 32
    sleep(1000)
    panel.offset = 0
    panel.length = screenGeometry(panel.screen).width
    panel.height = 24

So, you could do something like:

    [setPanelFullWidth.js]
    panel = panelById(panelIds[0])
    panel.length = screenGeometry(panel.screen).width
    panel.alignment = "left"

plasma-console() { qdbus org.kde.plasma-desktop /MainApplication showInteractiveConsole ;}
plasma-load-console() { qdbus org.kde.plasma-desktop /MainApplication local.PlasmaApp.loadScriptInInteractiveConsole "$1" ;}

But, for this, you'd have a

    plasma-load-console `pwd`/setPanelFullWidth.js

but you still have to hit the "execute" button in the plasma console.
(that's useful for testing out your script, but making it run at
login time is another story...)

I'm sure there's a way to do this via the other plasma APIs as well.

Anyway, i'm curious what you put together to solve this issue in the end.

--stephen
-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy@xxxxxxxx        -  http://www.ral.ucar.edu/~sdowdy/

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux