You are not logged in.

#26 2017-07-16 21:40:05

devnull
Member
Registered: 2017-06-29
Posts: 60

Re: Dynamic menus on BunsenLabs - a comprehensive guide

What a head is mine, thank you for the patience of pointing out what was in front of my eyes!

Offline

#27 2017-07-16 23:55:38

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

np! first I was looking through schema.pl and config.pl too.  big_smile   And I still did not find the square font type that was used by trizen on the obmenu-generator screenshot.

trizen.th.png

Offline

#28 2017-10-27 17:09:57

peterk
Member
Registered: 2017-10-27
Posts: 5

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Hello,
After googling around here is other way to have a start menu:
1- Install xdotool:

sudo apt install xdotool

2- Check ~/.config/openbox/rc.xml

<keybind key="W-space">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
</keybind>

3- Create Menu.desktop usr/share/applications

[Desktop Entry]
Type=Application
Icon=/usr/share/icons/Paper/24x24/categories/applications-system.png
Name=Menu
GenericName=Show apps menu
Comment=apps menu 
Categories=System;System Tools;
Exec=xdotool key Super+space
StartupNotify=true
Terminal=false
MimeType=inode/directory;
Name[en_GB.UTF-8]=Menu

Edit add your icon.

4 - Add a launcher to tint2rc:

launcher_item_app = Menu.desktop

5- Restart tint2

Last edited by peterk (2017-10-28 13:41:05)

Offline

#29 2017-10-27 21:14:32

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

^Indeed! Clicking the icon in tint2 simply starts the openbox menu (or whatever menu is set by super+space (default: right click) e.g. the menu by bl-obmenu-generator). xdotool was already installed on my system. I'm not sure why an extra keybind "W-space" would be needed for the menu if there is already super+space. Under 4 it is enough to use menu.desktop without the path (as under step 3 you used menu.desktop it would not work with Menu.desktop).

Last edited by martix (2017-10-27 21:17:27)

Offline

#30 2017-10-28 13:39:08

peterk
Member
Registered: 2017-10-27
Posts: 5

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Hi martix

Thanks for your comments
cool

Last edited by peterk (2017-10-28 13:39:44)

Offline

#31 2018-01-09 13:44:06

devnull
Member
Registered: 2017-06-29
Posts: 60

Re: Dynamic menus on BunsenLabs - a comprehensive guide

I just installed helium-dev using the netinstall script, and after installing obmenu-generator as described in the guide, issuing the install

Linux::DesktopFiles

, when I try to run it I have the following message:

$ obmenu-generator -s -i
Can't locate object method "get_icon_path" via package "Linux::DesktopFiles" at /usr/bin/obmenu-generator line 440.

Could it be because of the switch to gtk3? Anyone had the same issue?

Offline

#32 2018-01-09 17:43:05

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

@devnull The post here with the described steps might help.

Offline

#33 2018-01-09 21:53:55

devnull
Member
Registered: 2017-06-29
Posts: 60

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Hi, thank you for your answer, I solved it smile

Seems like the version in the repo is old, the most recent on github (0.84) is properly working with relative URLs.

Now, it doesn't manage to find all the icons, actually most of them are not there, but I think is because of the missing package gtk2-perl. I'll check it.

EDIT: in config.pl, line 52, I changed

  "gtk_rc_filename"     => "$ENV{HOME}/gtkrc-2.0",

in

  "gtk_rc_filename"     => "$ENV{HOME}/.config/gtkrc-2.0",

Last edited by devnull (2018-01-09 21:59:05)

Offline

#34 2018-01-10 09:30:36

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

@devnull Thank you for the details, meanwhile I just realized those steps were mentioned in the OP already.

If I understand correctly, you used the HoaS repo install method. That's indeed an older version, even the bl-obmenu-generator on gitlab is based on v. 0.69, which works fine on a Stretch based #BL. I will have a look at the gitlab version, it'd be surely a good idea to make an update and test it before the new release is out (and change the description in the OP). Do you still get the missing icons after those changes? I use Papirus and it looks really good, but it should work with other icon themes too.

Offline

#35 2018-01-10 22:02:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Dynamic menus on BunsenLabs - a comprehensive guide

martix wrote:

the HoaS repo install method. That's indeed an older version

Ooops, sorry folks, I haven't looked at that in a looooooong time  ops

I will try to update it when I have a minute but I'm rather busy atm so it may take a bit.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#36 2018-01-10 23:23:58

devnull
Member
Registered: 2017-06-29
Posts: 60

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Hi martix,
yes, after those steps everything works perfectly and I must say I agree, with paper icons it looks gorgeous!
Maybe we can just write in the OP that the HoaS repos is out of date?

HoaS, don't worry, installing from the git source is so easy that I'm not sure it's worth the effort to keep it in the repo, unless there are some advantages that I don't know about.

Thanks to everyone!

Last edited by devnull (2018-01-11 19:22:54)

Offline

#37 2018-01-11 19:04:52

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

^Yep, note added. I'll have to look at the bl-specific version too on gitlab. There are some minor changes implemented there like the terminal, icon theme names, etc.

Offline

#38 2018-04-04 13:45:52

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

The part for jgmenu (VI) was updated. Popupmenu is not on the list yet as it is still in development.

Last edited by martix (2018-04-04 13:54:09)

Offline

#39 2018-04-05 06:05:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,673
Website

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Just revisiting - I may have missed it, but for parts IV & V shouldn't installing the package openbox-menu be added to the instructions?


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#40 2018-04-05 21:27:31

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

^Parts IV and V indeed need openbox-menu, but it's the same e.g. with the debian menu as an entry or obamenu. The descriptions are - as the title suggests - basically for the default BunsenLabs configuration with the openbox-menu installed. jgmenu works well besides (together with) the openbox-menu, while the menu by obmenu-generator replaces it (although it is also possible to switch between this menu and the default openbox-menu).

Offline

#41 2018-04-06 02:17:44

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,673
Website

Re: Dynamic menus on BunsenLabs - a comprehensive guide

openbox-menu is a package which is needed for parts IV and V to work. It doesn't come with BL by default, although openbox suggests it. "The openbox menu" and "openbox-menu" are two different things. smile

Agreed, jgmenu looks very interesting, and once BL Helium is out I plan to play with it a bit...


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#42 2018-04-07 17:57:04

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

^Indeed, thank you for mentioning that package, I will add it above. I was thinking it comes by default with the menu. It turns out that openbox-menu is originally for LXDE and it is from the lxde-team. Interestingly the lxde menu still needs lxmenu-data (for building the menu), while the KDE or Gnome menu does not need anything else (leaving me wonder how it comes that their structure is "part" of debian already.) This was originaly an interesting finding for me, as a dynamic menu structure has been available without any further package (apart from openbox-menu) by simply putting those lines in menu.xml.

There is a good description on gentoo: "The menu.xml file contains information for the right-click menus in Openbox. By default the right click menu is predefined with some common applications, so unless the applications are installed on the system most of the default links on the menu will not be operational. Dynamic generation: An application called openbox-menu can be used to dynamically generate new Openbox right click menus based off information defined in the /etc/xdg/menus directory. After the menu generator has been installed, run the following command to create a new menu for the present user: openbox-menu." <- Tried it, pasted the output in menu.xml, but it wasn't the menu I expected...

It's interesting to notice that since version 3.5.0 Openbox is able to have icons next to menu entries. Have not seen so far a dynamic (root) menu with icons (not something like an Application submenu) with openbox-menu. Obmenu-generator and jgmenu have those features available though.

Last edited by martix (2018-04-07 18:16:20)

Offline

#43 2018-06-15 18:00:29

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Dynamic menus on BunsenLabs - a comprehensive guide

devnull wrote:

Hi martix,
yes, after those steps everything works perfectly and I must say I agree, with paper icons it looks gorgeous!
Maybe we can just write in the OP that the HoaS repos is out of date?


@HoaS As the created package was based on v0.66 and meanwhile obmenu-generator reached v0.84, I simply removed the insturctions pointing to the outdated package.

Also bl-obmenu-generator was updated to obmenu-generator's recent version and I tweaked schema.pl according to the Paper and Papirus icon themes. The OP was updated accordingly. With bl-obmenu-generator everything works out-of-the-box, every icon is there and changing from the Paper icon theme to Papirus requires an update of schema.pl by running:

cp ~/.config/bl-obmenu-generator/schema.pl ~/.config/bl-obmenu-generator/schema.pl.bak && sed -i '/Preferences/s/preferences-other/preferences-desktop/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/menu.xml/s/text-editor/menu-editor/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/schema.pl/s/text-editor/menu-editor/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/bl-text-editor/s/package_editors/cs-windows/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/bl-text-editor/s/hexedit/text-editor/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/obconf/s/gtk-preferences/preferences-desktop-tweaks/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/bl-compositor/s/window-new/Xfwm4CompositeEditor/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/gmrun/s/system-run/application-x-phatch/g' ~/.config/bl-obmenu-generator/schema.pl

It looks really nice with Papirus theme (screenshot with Paper icon theme is in the OP):

bl_obmenu_generatorpapirusiconthemebunsendarkhe.png

Somehow that screenshot with xfce4-screenshooter does not offer the best image quality...

Edit: There is now an optional dependency for (bl-)obmenu-generator called perl-file-desktopentry (File::DesktopEntry). If it is installed, (bl-)obmenu-generator will use it to provide locale support. In which cases is it actually useful? I just did not try this feature yet and I'm not sure what it is about.

Last edited by martix (2018-06-15 18:27:49)

Offline

#44 2018-07-31 02:01:04

hhh
That's easy!
Registered: 2015-09-17
Posts: 6,101
Website

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Bump, because I just linked to this thread from another post, and because this thread is EPIC.

Thanks again, martin. Cheers!

Offline

#45 2018-09-09 16:16:39

MALsPa
Member
From: albuquerque
Registered: 2016-06-20
Posts: 87

Re: Dynamic menus on BunsenLabs - a comprehensive guide

This is a great thread. I like how the LXDE Applications menu is used in SalentOS; the info in post #2 helped me to add that menu to Openbox in my Stretch installations. I don't normally use "dynamic" menus in Openbox, but they're nice to have.

Offline

#46 2018-09-27 21:21:22

Badboi
New Member
Registered: 2018-09-24
Posts: 1

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Hey matrix,
Can you readd the instructions for installation of Obmenu-generator through Trizen's git repository? It helped me quite a lot when it was there. I even had this page bookmarked even tho I installed archlinux and I'm pretty sure it would also be useful for people who don't use debian based distros.

Last edited by Badboi (2018-09-28 07:36:44)

Offline

#47 2018-11-22 19:10:45

peterk
Member
Registered: 2017-10-27
Posts: 5

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Hello,
Maybe already answer but with obmenu-generator - How can I change the font size?
I used to edit the rc.xml and even the .gtkrc-2.0.
Thanks.

Offline

#48 2018-11-22 19:42:34

ohnonot
...again
Registered: 2015-09-29
Posts: 3,194
Website

Re: Dynamic menus on BunsenLabs - a comprehensive guide

peterk wrote:

Hello,
Maybe already answer but with obmenu-generator - How can I change the font size?

you can't.
you can edit rc.xml directly:

<theme>
(...)
    <font place="MenuHeader">
      <name>Sans</name>
      <size>11</size>
      <!-- font size in points -->
      <weight>Bold</weight>
      <!-- 'normal' or 'normal' -->
      <slant>Normal</slant>
      <!-- 'italic' or 'normal' -->
    </font>
    <font place="MenuItem">
      <name>Sans</name>
      <size>10</size>
      <weight>Normal</weight>
      <slant>Normal</slant>
    </font>
(...)
</theme>

or you can use

obconf

to adjust the font size.

Offline

#49 2018-11-22 22:15:03

malm
jgmenu developer
Registered: 2016-10-13
Posts: 227
Website

Re: Dynamic menus on BunsenLabs - a comprehensive guide

@peterk obmenu-generator produces xml data (e.g. labels, commands and icon paths)

The graphics is done by the openbox menu.

Offline

#50 2018-11-22 22:38:21

peterk
Member
Registered: 2017-10-27
Posts: 5

Re: Dynamic menus on BunsenLabs - a comprehensive guide

Hi,
@ohnonot
@malm
I was messing around with lxappearance and not obconf,
Works great!!
Thanks for the reply.

Offline

Board footer

Powered by FluxBB