You are not logged in.
I've written a small, standalone X11 menu application. I'm posting this here
in the hope that you would wish to try it with your openbox+tint2 setup.
It provides a "conventional start menu" without using xdotool hacks with the
openbox menu.
It uses cairo/pango, so can easily be aligned with your tint2 configuration.
It's written from scratch and has a pretty small code base.
It's free from toolkits such as GTK and Qt (although I'm temporarily using
the gtk+-3.0 library to convert xpm icons to cairo_surfaces).
The jgmenu binary reads "menu items" from stdin in a similar way to dmenu and
dzen2, but with seperate fields for the name and command. There are a number
of wrappers to generate XDG type menus, etc.
If you're interested in checking it out, have a look at:
https://github.com/johanmalm/jgmenu
There is a screenshot in the README.md
Offline
This is awesome, thank you
In case you're interested, it compiles & runs under Alpine Linux and pops up in my dwm desktop:
Offline
Offline
Head_on_a_Stick - thank you. Yes of course I'm interested.
I'm glad it compiled and ran fine.
Does the window positioning work in dwm? I.e. did you set menu_valign=top or did the window default to top+left?
Offline
Does the window positioning work in dwm? I.e. did you set menu_valign=top or did the window default to top+left?
It works very well indeed, exactly as specified in ~/.config/jgmenu/jgmenurc
menu_margin_x = 0
menu_margin_y = 20
menu_width = 200
menu_radius = 1
menu_border = 0
#
# valid options for menu alignment are:
# - horizontal: left, right
# - vertical: top, bottom
#
menu_halign = left
menu_valign = top
item_margin_x = 3
item_margin_y = 3
item_height = 25
item_padding_x = 4
item_radius = 1
item_border = 0
max_items = 80
min_items = 0
font = Liberation Sans 10
icon_size = 22
icon_theme = Moka
ignore_xsettings = 0
ignore_icon_cache = 0
show_title = 0
color_menu_bg = #002b36 100
color_menu_fg = #93a1a1 100
color_norm_bg = #002a36 100
color_norm_fg = #93a1a1 100
color_sel_bg = #2aa198 100
color_sel_fg = #000000 100
color_noprog_fg = #eeeeee 100
color_title_bg = #ffffff 20
Offline
Compiles and runs on Mint Sarah + OB +Tint2 (well it did, once I installed a missing -dev package 8o )
I still prefer the Openbox menu, but I will swap out the MintMenu for jgmenu, and see how that goes.
Great work
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
@malm thank you for this! I would like to try it out, but hit a problem compiling. After running 'make' once and checking the "missing package" errors I installed:
libcairo2-dev libpango1.0-dev librsvg2-dev libgtk-3-dev libxml2-dev
That got rid of most of the error messages, but this remained:
john@bunsen1:/data/john/downloads/jgmenu-master$ make
CC xsettings.o
xsettings.c: In function ‘parse_settings’:
xsettings.c:141:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t i = 0; i < n_entries; i++) {
^
xsettings.c:141:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
xsettings.c: In function ‘free_xsettings’:
xsettings.c:214:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t i = 0; i < count; i++) {
^
Makefile:58: recipe for target 'xsettings.o' failed
make: *** [xsettings.o] Error 1
This looked pretty much like a failure so I didn't proceed to 'make install' (in fact I was planning to use checkinstall).
@malm do you have any advice?
@others did no-one else get this error message? (I downloaded from GitHub about 1/2 hr ago.)
...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
^ I didn't get that error; and I only needed to install 'libxml2-dev'
D/l and compiled about 6 hrs ago
I got a warning on first run though...
$ jgmenu_run pmenu
warning: value must be > 0; value='0'; key='min_items'
Last edited by damo (2016-10-14 02:11:01)
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
johnraff: I have pushed a fix for the errors in xsettings.c
In ANSI C (C89), variables have to be declared at the start of a block.
The "size_t i" bit was written in C99/C++ style. Let me know if it still doesn't compile.
Offline
Hi malm. I'm still getting an error, but in a different function this time:
john@bunsen1:/data/john/downloads/jgmenu-master$ make
CC x11-ui.o
CC config.o
CC util.o
CC geometry.o
CC isprog.o
CC sbuf.o
CC icon-find.o
CC icon.o
CC xdgdirs.o
CC xdgapps.o
CC xsettings.o
CC xsettings-helper.o
xsettings-helper.c: In function ‘print_settings’:
xsettings-helper.c:32:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (size_t i = 0; i < count; i++) {
^
xsettings-helper.c:32:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Makefile:58: recipe for target 'xsettings-helper.o' failed
make: *** [xsettings-helper.o] Error 1
EDIT: This is on BunsenLabs Hydrogen (Debian Jessie).
Last edited by johnraff (2016-10-14 07:15:41)
...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
@others did no-one else get this error message?
No errors for me once the dependencies were satisfied but Alpine Linux uses musl rather than the GNU libc and I'm tracking the edge branch, which keeps pace with my Arch [testing] system in respect of package versions.
Offline
Just pitching in. I've been discussing with Johan since June about his project, and over all this time it was a pleasure to interact with him.
I was trying to find a simple start menu implementation that is not coupled to any existing Desktop Environment and does not come with heavy dependencies. This is because many users have asked in the past for a start menu in tint2, so that they can use the panel in WMs that do not provide one. jgmenu looks like a perfect candidate. It's simple, lightweight and themable.
I'm thinking about adding a start button to tint2, which can be configured to run jgmenu, the openbox menu or any other menu the user wishes. (I know it can be done with launchers, but it's a bit complicated, the user needs to write a custom desktop file; also one might want to place the start button separate from the launchers). I think this would make all users happy, regardless of the menu they prefer to use.
So please take a look at jgmenu if you have time, and offer feedback, I'm very curious to see what you think.
Offline
i really like the looks & sound of this.
do i understand correctly that you strive to get rid of all gtk (or any toolkit) dependencies, but haven't yet?
i tried the AUR package, and as you yourself pointed out i complains about some gtk3 stuff not being found.
can i expect this to change soon? because i really do not have any gtk3 on my system.
Offline
... complains about some gtk3 stuff not being found....
I got complaints about gtk (gtk is installed), but they went away once I had installed 'libxml2-dev'.
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
Thanks for all the feedback.
damo - the warning you got regarding "min_items" is a complaint that "min_items" in your jgmenurc config file is not greater than zero. That's my fault for doing "min_items=0" in example jgmenurc. I have now changed it.
"min_items" is the minimum menu height expressed in items, so this config option only has an affect if it's greater than the actual number of items in the menu.
johnraff - I should have looked a bit further when I changed xsettings.c. I've made the same change to xsettings-helper.c. Let me know if you still have a problem compiling.
ohnonot - yes. The only gtk dependency is in "icon.c" for the get_xpm_icon() function. I will get rid of it, just haven't figured out how yet. @o9000 have got a few ideas, so between us I'm sure we'll get there. Rest assured, the "#include <gtk/gtk.h>" in icon.c will disappear!
I have added gtk3 to the AUR package for the time being.
Offline
Like passing ships at night. @o9000 has just sorted an xpm-loader. Thanks Ovidiu, you're a genius.
The gtk dependency is gone.
Offline
It was not hard, I've just ported the GDK implementation, stripped of all the glib stuff
By the way, I propose we all share a moment of silence in gratitude to the GTK developer who wrote this sad comment in 1999: https://github.com/GNOME/gdk-pixbuf/blo … -xpm.c#L39
Offline
Offline
@brontosaurusrex - No, but we should be able to get there. Maybe similar to dmenu?
Offline
Like passing ships at night. @o9000 has just sorted an xpm-loader. Thanks Ovidiu, you're a genius.
The gtk dependency is gone.
awesome. now i can play.
{)
Offline