You are not logged in.
Pages: 1
Jēßūs:
I do not know English therefore I am using a translator (in case I say something wrong or do not understand)
I leave a script that is to create a dynamic menu within the menu of bunsenlabs, is created from the package lxde-data and openbox-menu. In the script you will have the option of adding the menu with icons or without icons or delete it. I hope you like it
#!/bin/bash
clear
echo "|--------------------------------------------|"
echo "|MENU DINAMICO POR TU SERVIDOR JEBÚS ( ͡° ͜ʖ ͡°)|"
echo "|--------------------------------------------|"
sleep 2
clear
while :
do
echo " Escoja una opcion "
echo "0. Instalar dependencias para que funcione el menu dinamico(OBLIGATORIO)"
echo --------------------------------------------------------------------------
echo "1. Instalar Menu dinamico sin iconos."
echo "2. Instalar Menu dinamico con iconos."
echo "3. Limpiar(es en caso que quieras cambiar del menu sin iconos al menu con iconos y viceversa."
echo "4. Salir."
echo -n "Seleccione una opcion [0 - 4]"
read opcion
case $opcion in
0) echo "instalando dependecias...(ง︡'-'︠)ง";
sudo apt-get install openbox-menu lxmenu-data && echo "Depedencias instaladas con exito!" && sleep 1 && clear;;
1) echo "Menu sin iconos instalado con exito!";
sleep 1
clear && sed -i '84i <menu execute="openbox-menu -i lxde-applications.menu" id="apps" label="Aplicaciones"/>' /$HOME/.config/openbox/menu.xml;;
2) echo "Menu con iconos instalado con exito!";
sleep 1
clear && sed -i '84i <menu execute="openbox-menu lxde-applications.menu" id="apps" label="Aplicaciones"/>' /$HOME/.config/openbox/menu.xml;;
3)echo limpiado con exito!;
sleep 1
clear && sed -i '84d' /$HOME/.config/openbox/menu.xml;;
4) echo "Gracias (͡° ͜ʖ ͡°)";
exit 1;;
esac
done
https://gitlab.com/dr_iian/menudinamico
--- Mod edit - please use [ code ] tags for scripts and terminal output ---
Last edited by dr_iian (2017-02-04 14:16:12)
Offline
Thanks for the correction, I did not find how to do that but he taught me, very grateful .
Offline
Interesting, thank you!
A picture of how it actually looks might be helpful. Btw that gitlab page can be only opened if someone is registered there.
Offline
Martin, I'm looking for a page to host my scripts, while I have it here
Offline
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Offline
Great! Thank you! There are always users wanting to have a full start-menu in the openbox-menu and this is a great solution.
The script did work for me, but it pasted the lxde line at the wrong place in menu-xml. I guess it's not easy and practical to define the exact line to place the code in menu.xml as it varies amongst the users. So these are basically the steps without script:
1. Install the dependencies:
sudo apt-get install openbox-menu lxmenu-data
2. Open menu.xml via openbox-menu/Preferences/Openbox/Edit menu xml. Place the following code in menu.xml e.g. between the line <separator/> and <menu id="accessories" label="Accessories"> (this is probably somewhere around the lines 70 and 85) and in this case the "Applications" menu entry will be above "Accessories" in the openbox-menu:
<menu execute="openbox-menu lxde-applications.menu" id="apps" label="Applications"/>
It can be pasted to a different place in the menu structure or have a different entry name instead of Applications, just change the word after label=" in the code above.
If there should be no icons, put a "-i" after openbox-menu:
<menu execute="openbox-menu -i lxde-applications.menu" id="apps" label="Applications"/>
3. Restart openbox via openbox-menu/Preferences/Openbox/Restart
Now there should be a very nice dynamic menu implemented in the openbox-menu.
Last edited by martix (2017-02-05 10:04:13)
Offline
^ How does this script compare with the dynamic Debian menu?
<menu id="/Debian"/>
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Great! Thank you! There are always users wanting to have a full start-menu in the openbox-menu and this is a great solution.
The script did work for me, but it pasted the lxde line at the wrong place in menu-xml. I guess it's not easy and practical to define the exact line to place the code in menu.xml as it varies amongst the users. So these are basically the steps without script:
1. Install the dependencies:
sudo apt-get install openbox-menu lxmenu-data
2. Open menu.xml via openbox-menu/Preferences/Openbox/Edit menu xml. Place the following code in menu.xml e.g. between the line <separator/> and <menu id="accessories" label="Accessories"> (this is probably somewhere around the lines 70 and 85) and in this case the "Applications" menu entry will be above "Accessories" in the openbox-menu:
<menu execute="openbox-menu lxde-applications.menu" id="apps" label="Applications"/>
It can be pasted to a different place in the menu structure or have a different entry name instead of Applications, just change the word after label=" in the code above.
If there should be no icons, put a "-i" after openbox-menu:
<menu execute="openbox-menu -i lxde-applications.menu" id="apps" label="Applications"/>
3. Restart openbox via openbox-menu/Preferences/Openbox/Restart
Now there should be a very nice dynamic menu implemented in the openbox-menu.
Perfect!
Offline
There's also obamenu. It worked nicely for me in the past.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
...and my long-time favorite, obmenu-generator.
Offline
Offline
I found this command on the lxde menu wiki page and it seems it is needed for updating the entries of lxmenu:
find ~/.cache/menus -name '*' -type f -print0 | xargs -0 rm
@johnraff I just tried obamenu and it works. However plenty of icons in the submenu don't get shown (vlc, audacious, xcfa, ClipIt etc.) although the icon theme is correctly set in the obamenu file (somehow "out of the box" there are also apps without entry like Kite). For me it's not really an issue though as I just wanted to try it. Maybe someone can comment on it who is more experienced with this menu.
Offline
I always used obamenu without icons, so its style blends in with the rest of the openbox menu. The comments in the file did say something about tweaks needed to get all icons displayed, I seem to recall...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
@damo I've been using the Debian Menu for a while and at first glance it seems to be overcomplicated: Lots of submenus of submenus and there are also some strange entries (like xbiff and xeyes). However it's fast and works fine, I got used to it already. Lxde/lxmenu is more pragmatic and better organized.
@John Indeed, thank you for the hint, it says there: "You are advised to soft link all icon files outside the standard icon directory to /usr/share/pixmaps or similar. ("find" is your friend, e.g. find /usr/share/icons -name 'foo.*')."
Btw. the same way like above (without installing anything) also a gnome and kde4 menu can be implemented in the openbox-menu. Simply pasting
<menu execute="openbox-menu -i gnome-applications.menu" id="Apps" label="Applications"/>
works (although the Games category seems to be missing on default; for kde4 just replace "gnome" with "kde4" in the code).
As mentioned above, Lxde/lxmenu requires the lxmenu-data package, otherwise it gives an "invalid output from pipe-menu" error message.
Offline
Pages: 1