Results 1 to 5 of 5

Thread: a little KDE menus hack

  1. #1

    Default a little KDE menus hack

    I don't like how KDE collapses menus of categories containing a single entry, as it does in openSUSE. It doesn't make things clearer, and application links look pretty silly when represented with a directory icon. I could not find how to change that, neither in KDE settings nor in the freedesktop specs. I finally found a solution, which works halfway, as shown in the image.

    1. illustrates normal behaviour, as in Ubuntu (and others).
    2. is openSUSE menus collapsing (feature?).
    3. is how KDE menus look after I applied the following trick.

    The trick consists of creating a dummy desktop file for a faked application (Exec=donothing) represented by a 1x1 transparent icon (Icon=blank.png) and adding it to all categories which contain a single menu entry. However the name could not be left empty, so I used a dot (you can see it in the image).


    Code:
    # cat /usr/local/share/applications/X_dummy.desktop
    [Desktop Entry]
    Name=. 
    Comment=Dummy menu entry
    Exec=donothing
    Icon=blank.png
    Terminal=false
    Type=Application
    StartupNotify=true
    OnlyShowIn=KDE
    Categories=X-Administration-Gnome-Personal;X-Administration-Gnome-System-gdm;X-Administration-Kde-Desktop;X-Communication-Chat-Gnome;X-Applications-Programming-Python;X-Applications-DTP;
    # comment out the following line to collapse menus (openSUSE default)
    #Hidden=true
    I know, it's a quick and dirty hack. It would be better to simply disable menus collapsing but I couldn't figure out how. The desired behaviour is the one shown in picture 1.

  2. #2

    Default Re: a little KDE menus hack

    You need to make it bring up a dialogue box saying "Congratulations! You've won!" if you manage to click on it...


  3. #3

    Default Re: a little KDE menus hack

    Quote Originally Posted by Confuseling View Post
    You need to make it bring up a dialogue box saying "Congratulations! You've won!" if you manage to click on it...

    Could be easily done by replacing the Exec line in the X_dummy.desktop example with
    Code:
    Exec=kdialog --msgbox "Congratulation! You've won!"
    I guess, I'll keep it.


  4. #4

    Default Re: a little KDE menus hack

    i wonder if you can use a hard space (shift+ space) for the filename? that way it would be blank.

  5. #5
    Join Date
    Jan 2009
    Location
    USA Pennsylvania
    Posts
    1,287

    Default Re: a little KDE menus hack

    Is this not the same as right clicking the application launcher, then choosing Application Launcher Menu Settings, then under options uncheck Reduce Menu Depth? (At least if you're using the classic style as in your screen shots, otherwise with the kickoff style it's on the first screen of the dialog box).

    Take Care,

    Ian
    Laptop: Dell Inspiron E1505 | OpenSUSE 12.1/Windows Vista | KDE | Intel CPU T2050 1.6 GHz | Intel 945GM | 3.2GB RAM
    Box: OpenSUSE 12.1/Windows 7 | KDE | Intel Core 2 Quad 8300 2.5GHz/core | nVidia Geforce 9500GT 1GB| 4 GB RAM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •