I want to be able to synchronize my KDE menus with fbpanel, to totally replace the KDE panel and menu.
Obsolete - it turns out this was implemented but not documented!
https://github.com/spiralofhope/ruby-random/tree/master/dead/fbpanel menu importing
stuff ∞
https://web.archive.org/web/20080407204203/http://docs.kde.org:80/userguide/kde-menu.html
- Learn how to pick apart the menu
-
Learn how to pick apart each
.desktop
file
NOTE: In PCLinuxOS 2007, $KDEDIR
is just ~
so it can be ignored.
-
menu structure:
/etc/xdg/menus/*.menu
~/.config/menus/*.menu
-
sub-menus:
/usr/share/desktop-directories/*.directory
-
applications:
/usr/share/applications/*.desktop
note: KDE continues to support old-style menus that are defined by the directory structures in $KDEDIR/share/applnk
(system wide) and $HOME/.kde/share/applnk
(user specific). This is observed unless the .desktop
file has a Categories=
line. In that case the categories determine the location in the menu.
rebuild the menu with kbuildsycoca
-
TODO - The Blackbox
right-click
menu.. which would arguably be a better format to transition to.- There's also a nice Fluxbox script which builds fluxbox scripts from the KDE scripts.
task 1 - take all .desktop
files, scan them and import them as one big flat list for fbpanel. ∞
It's been so highly recommended that I learn to pursue problems from a programming standpoint, and code solutions.
Everyone keeps talking about "the itch" to solve problems.
So I've been taking some time to adopt this perspective (10 years or so.. heh)
Some of it is finally bleeding through. I took a good 6-12 months off from significant programming, and after 4 days a lot of it has come back. I still can't fathom this 'bit rot' I'm seeing with some of my code though. =)
fbpanel is a nice light bottom-bar. It's so wonderfully wonderful except it crashes and burns and has a hard time with some tray icons. Or rather it used to. The developer dusted off the code and helped out with a serious of issues. Now it's perfect. With Blackbox it completely replaces KDE on my setup. kthxbye.
Now since the programmer wasn't interested in importing the KDE menu structure, I wanted to solve this myself. My initial goal: Take all .desktop
files, scan them and import them as one big flat list for fbpanel.
It's rough, I know.. but it worked. Yay!
Except that just as I finished, I learned that the functionality I wanted was implemented and just wasn't documented! =)
Doh!
Haha.. live and learn. At least I managed to complete what I set out to do.
TO USE:
I've kept this separate from the existing menu, because it's so experimental and since it is designed to be updated automatically you wouldn't want your personal menu to get obliterated.
Just pick a juicy spot in your ~/.fbpanel/default
file where you'd like a new menu icon to be added, and add this text:
## flat.rb -- DO NOT CHANGE THIS LINE OR THE BLOCK OF CODE BELOW. ## flat.rb -- DO NOT CHANGE THIS LINE OR THE BLOCK OF CODE ABOVE.
Run this script, and it will search for this block of code and replace it with a full menu, gathered from /usr/share/applications/*.directory
This is just phase one. More code will have to be written to understand the structure of those files.
-
attempt 04 -- It works!
task 2 - figure out the kde sub-menu structure ∞
(to do)
ABORTED: What I wanted was officially supported!
Plugin { type = menu expand = false padding = 0 config { icon = star systemmenu { } separator { } item { icon = gnome-settings name = configure command = configure } } }
Last updated 2019-11-16 at 05:12:28
Noting that this was a project, and was killed.