Reply to topic

kde ==>gnome-like panels layout.js

nowardev
Registered Member
Posts
244
Karma
0
OS

kde ==>gnome-like panels layout.js

Fri Apr 08, 2011 1:52 pm
EDIT :

downloading Plasma panels collection you can get a lots of panels layout

just see this

http://kde-apps.org/content/show.php/Pl ... ent=155726



Why?
because i like the gnome layout only for panels :)

so what did you get?




http://wstaw.org/m/2011/04/21/plasma-desktopOO1889.jpg
LOL gnome icon :( xD


should i try ?

You can try without system modifications , in this way (NOTE THIS IS A GIF ANIMATED SO CLICK ON IT)

http://nowardev.files.wordpress.com/201 ... el-kde.gif




nice so how ? is there a tutorial ? how to get ...?

yes there is on my blog where you can get more information

http://nowardev.wordpress.com/2011/04/1 ... each-user/

in few steps here it is :

ok i have installed kubuntu natty without the pakcage kubuntu-default-settings

i am editing the file that is here

kdesudo kate /usr/share/kde4/apps/plasma/layout-templates/org.kde.plasma-desktop.defaultPanel/contents/layout.js


NOTE FOR KDE <= 4.7.4 You could get a crash ... systemtray is the bad guy... so remove manually your old panels before...

Code: Select all
   /////////function remove in case of error of first remove :S
function remove()
{
  for (i in panelIds) {
       

   panelById(panelIds[i]).remove()
    }
 
}
//////////////////////////////////////////////////////////


/////function remove standard///////////////////////////////
function RemoveOldPanels()
{
    for (i in panelIds) {
       // panelById(panelIds[i]).remove()
       p = panelById(panelIds[i]);
       if (typeof p === "undefined") {
       print("E: Couldn't find first panel");
       remove() //load the remove function in case of problems
       }
        else    {
     panelById(panelIds[i]).remove()
        }
                                    }
}

RemoveOldPanels() //load the function
 //////////////////////////////////////////////////////////



//start another function to create panels layout
function gnome2(){
        var panel = new Panel
    if (panelIds.length == 1) {
        // panel.location = 'bottom'
        panel.location = 'top'
    }


    panel.height = 27


    //panel.addWidget("launcher")
    launcher = panel.addWidget("simplelauncher");
    launcher.writeConfig("format", "Description");
    launcher.writeConfig("showMenuTitles", "true");
    launcher.writeConfig("views", "Applications,Favorites,Computer,Settings,RunCommand,Leave");
//    launcher.writeConfig("icon", "start-here");

    panel.addWidget("panelspacer_internal")


    launcherinternet = panel.addWidget("simplelauncher");
    launcherinternet.writeConfig("icon", "applications-internet");
    launcherinternet.writeConfig("relativePath", "Internet/");
    launcherinternet.writeConfig("format", "Description");


    launchersystem = panel.addWidget("simplelauncher");
    launchersystem.writeConfig("icon", "applications-system");
    launchersystem.writeConfig("relativePath", "System/");
    launchersystem.writeConfig("format", "Description");

    var systemsettings = panel.addWidget("quicklaunch");
    systemsettings.writeConfig("iconUrls","file:////usr/share/applications/kde4/systemsettings.desktop")

    var help = panel.addWidget("quicklaunch")
    //qlaunch.writeConfig("iconSize", "24")
    help.writeConfig("iconUrls","file:///usr/share/applications/kde4/Help.desktop")


    panel.addWidget("panelspacer_internal")


    var firefox = panel.addWidget("quicklaunch")
    firefox.writeConfig("iconUrls","file:///usr/share/applications/firefox.desktop")

    panel.addWidget("pastebin")
    var quick = panel.addWidget("quickaccess");


    var dolphin = panel.addWidget("quicklaunch");
    dolphin.writeConfig("iconUrls","file:////usr/share/applications/kde4/dolphin.desktop")

    var konsol = panel.addWidget("quicklaunch")
    konsol.writeConfig("iconUrls","file:///usr/share/applications/kde4/konsole.desktop")



    //var stanndard = panel.addWidget("quicklaunch");

    //
    //
    //panel.addWidget("smooth-tasks")


    panel.addWidget("panelspacer_internal")

    panel.addWidget("sm_cpu")
    panel.addWidget("sm_ram")
    panel.addWidget("sm_temperature")
    panel.addWidget("systemtray")

    clock = panel.addWidget("digital-clock");
    clock.writeConfig("showDate", "true");
    clock.writeConfig("showDay", "true");
    clock.writeConfig("showSeconds", "true");
    clock.writeConfig("showYear", "true");
    clock.writeConfig("showShadow", "false");
    clock.writeConfig("showYear", "true");
    //clock.writeConfig("showTimezone", "true");
    clock.writeConfig("plainClockFont", "Serif,12,-1,5,75,0,0,0,0,0");
    clock.writeConfig("useCustomColor", "true");
    clock.writeConfig("plainClockColor", "255,255,255");
    clock.writeConfig("plainClockDrawShadow", "false");


    lockout = panel.addWidget("lockout")
    //lockout.writeConfig("showHibernateButton","true")
    lockout.writeConfig("showLogoutButton","true")
    lockout.writeConfig("showLockButton","false")
    lockout.writeConfig("showSleepButton","false")
    lockout.writeConfig("showSwitchUserButton","true")



    //panel.addWidget("tasks")
    //smooth-tasks
    //panel.addWidget("trash")


    var panel = new Panel
    if (panelIds.length == 2) {
        // we are the only panel, so set the location for the user panel.location = 'bottom'
        panel.location = 'bottom'
    }

    panel.height = 27
    //panel.addWidget("launcher")
    //panel.addWidget("pastebin")
    panel.addWidget("showdesktop")
    panel.addWidget("tasks")

    pager = panel.addWidget("pager");
    pager.writeGlobalConfig("rows", "1");


    panel.addWidget("trash")
    //panel.addWidget("smooth-tasks")


}

gnome2()




 
 
 
 

Last edited by nowardev on Fri Mar 22, 2013 12:36 pm, edited 14 times in total.
User avatar toad
Global Moderator
Posts
1258
Karma
7
OS
This is really cool! Where did you get the info to put this together?


Debian testing
nowardev
Registered Member
Posts
244
Karma
0
OS
well first of all , kubuntu has his kubuntu-default-settings package that is their way to get kubuntu customized.

so i looked where the debian package was installed i get the url
after that i have seen the init js script
then i have googled i have read documentation on kde website but few stuff
===>
then i have tried ==> devastated a lots of times panels xD
===>

then i have get the path for applets and then to get the names usefull for panel i have used awk (i know some stuff to filter)

ls /usr/share/kde4/services/ | awk '/plasma-applet/{gsub(/plasma-applet-/,"") ;gsub (/.desktop/ ,"") ;print}'


then ... well it's so easy so intuitive bah

now i am writing a script bash to write xD the js file with kdialog menu :P
User avatar toad
Global Moderator
Posts
1258
Karma
7
OS
I'm impressed. The only thing that bothers me with KDE is that this kind of information is so difficult to unearth (almost windowesque). Devs seem to know where it is which makes sense, but try to google for it as a mere mortal...

Methinks, perhaps a new wiki entry?


Debian testing
nowardev
Registered Member
Posts
244
Karma
0
OS
well you have right , for a normal guy is a bit hard to understand
but after some years on linux world i get some skill on searchin stuff xD

everytime i discover something i write on my blog , a lots is pubblic but a lots more is not links some programs xD documnetation and so on ..

anyway a lots of stuff i have found here http://techbase.kde.org/

http://techbase.kde.org/KDE_System_Administration
http://techbase.kde.org/Getting_Started
User avatar toad
Global Moderator
Posts
1258
Karma
7
OS
I suppose it is the lack of practical examples which hinders me from reading beyond line 2 of any of those links - the fact that I have no IT background doesn't help :)

Anyway, many thanks for posting your script.


Debian testing
nowardev
Registered Member
Posts
244
Karma
0
OS
:) i hope this will help gnome users to feel comfortable into kde too :P
User avatar Moult
Global Moderator
Posts
663
Karma
2
OS
This is wonderful stuff! The GNOME layout tweak is great and I'm sure many people who appreciate the GNOME way of doing things will love it, but I'm also impressed because I didn't know KDE could use JS to do that!

Help write a wiki page on it and I'll give you a cookie!


Moult, proud to be a member of KDE forums since 2008-Oct.
thinkMoult - source for tech, art, and animation: hilarity and interest ensured!
WIPUP.org - a unique system to share, critique and track your works-in-progress projects.
nowardev
Registered Member
Posts
244
Karma
0
OS
well i have already written something about that on the my blog , it's not written for nobs, or maybe yes ? :o , anyways is not written like i would like , but i have few timeso..

http://nowardev.wordpress.com/2011/04/1 ... each-user/

you can copy paste what you want my blog license is fdl :) enjoy!
User avatar dpalacio
Registered Member
Posts
237
Karma
2
OS
It has been promoted mainly to distribution packagers:
http://techbase.kde.org/KDE_System_Admi ... pScripting


// Debian Sid amd64 KDE 4.6.5.
// Debian Squeeze i386. KDE 4.4.5.
connect(post,SIGNAL(readSignature()),qapp,SLOT(quit()));
capponz
Registered Member
Posts
3
Karma
0
OS
awesome, many thanks!!!!
Where's the beautiful wallpaper from?
cheers

 
Reply to topic

Bookmarks



Who is online

Registered users: airdrik, Baidu [Spider], Bing [Bot], farid, ghevan, Google [Bot], hsnnsnc, jacobseated, Lachu, leite, Majestic-12 [Bot], Sogou [Bot], Yahoo [Bot]