You are not logged in.

#41 2016-10-18 10:59:42

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: jgmenu

getting some errors as well on jessie

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    xpm-loader.o
     CC    xdgdirs.o
     CC    xdgapps.o
     CC    xsettings.o
     CC    xsettings-helper.o
     CC    config-xs.o
     CC    filter.o
     CC    jgmenu.o
     LINK  jgmenu
     CC    jgmenu-parse-xdg.o
     LINK  jgmenu-parse-xdg
     CC    jgmenu-icon-find.o
jgmenu-icon-find.c: In function ‘main’:
jgmenu-icon-find.c:59:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
     LINK  jgmenu-icon-find
     CC    jgmenu-xsettings.o
     LINK  jgmenu-xsettings

Offline

#42 2016-10-18 11:34:40

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: jgmenu

^ Same here, on a stock BL in Virtualbox.


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

#43 2016-10-18 20:43:17

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

Re: jgmenu

Sorry for breaking "make install" last night. It was rather careless of me. I have just pushed a fix (hope it works this time!)

@johnraff: The simplest way is to just do a "make" followed by "make install", that will install the programs in your local ~/bin/ directory (without needing sudo). It assumes that you have ~/bin in your $PATH. In this scencario, the man pages are installed to ~/share/man/man1 where you can read them with "man ./jgmenu.1" etc.
No need to create a .deb package.

If I were you, I'd do the following:
remove jgmenu* from /usr/bin/
remove jgmenu* from ~/bin/
cd /data/john/downloads/jgmenu
git pull
make clean
make
make install

@HoaS: When you get a chance - does "jgmenu_run pmenu" work now without the symlink you created?
What shebang do you get in ~/bin/jgmenu-parse-pmenu (after "make install")?
I've assumed your /usr/bin is symlinked to /usr/local/bin (if it's not, let me know and I'll modify the script)

Offline

#44 2016-10-18 21:21:35

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,063
Website

Re: jgmenu

malm wrote:

does "jgmenu_run pmenu" work now without the symlink you created?

Yes, the program works properly without any added symlinks.

However, I do have to change the shebang in jgmenu-parse-pmenu.py to !#/usr/local/bin/python2.7 before running:

gmake && gmake install

http://openports.se/devel/gmake

What shebang do you get in ~/bin/jgmenu-parse-pmenu (after "make install")?

As mentioned above, I have to change the shebang before compiling the program.

OpenBSD: ~ $ head -n1 bin/jgmenu-parse-pmenu.py                
#!/usr/local/bin/python2.7

If the shebang is not changed then the original error message is shown:

env: python: No such file or directory

I've assumed your /usr/bin is symlinked to /usr/local/bin

No, those directories are not linked.

Software is handled slightly differently under the BSDs, only packages in the base system have binaries in /usr/bin -- all other packages (called "ports" in BSD land) place their binaries in /usr/local/bin

Finally, just to note that your current HEAD appears to have an error somewhere -- it compiles fine but shows this error:

OpenBSD: ~/git/jgmenu $ jgmenu_run pmenu 
/home/empty/bin/jgmenu-pmenu.sh[3]: jgmenu-parse-pmenu: No such file or directory
OpenBSD: ~/git/jgmenu $ ls -l /home/empty/bin/jgmenu-parse-pmenu                                                                                           
-rwxr-xr-x  1 empty  empty  7498 Oct 18 22:24 /home/empty/bin/jgmenu-parse-pmenu

v0.4.2 works fine though smile

Offline

#45 2016-10-19 05:31:51

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

Re: jgmenu

^ Sorry. I probably should have said - I've done some renaming since v0.4.2 (all to support this python2.7 thing smile )
In the git repo jgmenu-parse-pmenu.py keeps the original shebang (#!/usr/bin/env python). I didn't want the install script to touch this one as your source tree would then change.

When you run "make install", jgmenu-parse-pmenu.py is renamed to jgmenu-parse-pmenu (without the .py) and has its shebang changed to whatever will work on your system.

It shouldn't matter, but for the sake of cleanliness, ~/bin/jgmenu-parse-pmenu.py could (should) be deleted.

I don't understand the last bit.
What happens if you do

make clean
make
make install
cd ~
jgmenu-parse-pmenu

You should be able to run jgmenu-parse-menu (without .py) from the command line.
jgmenu-pmenu.sh and jgmenu_run are just convenience wrappers to call jgmenu-parse-pmenu

Offline

#46 2016-10-19 06:18:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,547
Website

Re: jgmenu

malm wrote:

If I were you, I'd do the following:
remove jgmenu* from /usr/bin/
remove jgmenu* from ~/bin/
cd /data/john/downloads/jgmenu
git pull
make clean
make
make install

Thank you! This time it all went smoothly, no error messages or warnings. (I didn't clone the git repo, just downloaded the zip.)

'jgmenu_run pmenu' brought up a very nice-looking menu.  cool
jgmenu_191016_15_22_34.jpg

When I've played with the config I might have some comments/requests from a user point of view...

Last edited by johnraff (2016-10-19 06:24:08)


...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 )

Introduction to the Bunsenlabs Boron Desktop

Offline

#47 2016-10-19 06:31:34

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,063
Website

Re: jgmenu

malm wrote:

I don't understand the last bit.
What happens if you do

make clean
make
make install
cd ~
jgmenu-parse-pmenu

I started from fresh so used these first:

rm -rf ~/git/jgmenu
rm ~/bin/jgmenu*

Then I cloned a fresh repository and ran your commands (with 's/make/gmake/'):

OpenBSD: ~ $ jgmenu-parse-pmenu                     
ksh: jgmenu-parse-pmenu: No such file or directory
OpenBSD: ~ $ bash -c 'jgmenu-parse-pmenu'           
bash: /home/empty/bin/jgmenu-parse-pmenu: /usr/bin/python2.7: bad interpreter: No such file or directory
OpenBSD: ~ $ head -n1 ~/bin/jgmenu-parse-pmenu 
#!/usr/bin/python2.7
OpenBSD: ~ $

So it should be /usr/local/bin/python2.7 rather than /usr/bin/python2.7

I should note here that there are three versions of python available in OpenBSD:
http://openports.se/lang/python

I have both 2.7 and 3.5 installed, no idea why...
big_smile

Offline

#48 2016-10-19 17:42:00

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,063
Website

Re: jgmenu

Update: version v0.4.2 works perfectly without any modifications at all.

The problem was that I had failed to configure Python properly on my system -- when the packages are installed a symlink should be made from the desired version to /usr/local/bin/python and I forgot to do this...
:8

Please accept my humble apologies for wasting your time with this, the v0.4.2 release works as expected under OpenBSD-current with no modifications needed.

Offline

#49 2016-10-19 18:18:36

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: jgmenu

^ I figured as much, as Debian seems to respect /usr/bin/python, which suggests to me that it is symlinked, most likely to python 2.7. There is potentially a gotcha in that though, if the code I develop depends on python3.

Edit: Yep it is symlinked to python2.7, so well-written python code most likely needs to target a specific python binary if it depends on certain features, etc. Debian also provides /usr/bin/python2 and /usr/bin/python3 for a more minor version agnostic shebang call.

I tend to use #! /usr/bin/python in my scripts and can see now that I need to stop that.

Offline

#50 2016-10-19 20:35:28

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: jgmenu

Compiled latest git now, another dumb question: what is pmenu and why is not working for me? smile (xdg is)

Offline

#51 2016-10-19 20:40:42

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: jgmenu

brontosaurusrex wrote:

Compiled latest git now, another dumb question: what is pmenu and why is not working for me? smile (xdg is)

man jgmenu_run
COMMANDS
       Valid commands include:

       pmenu
               Menu based on .directory and .desktop files

       xdg
               Menu based on .menu file

       csv
               Menu based on .csv file

       cache
               Create icon cache

Last edited by damo (2016-10-19 20:41:31)


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

#52 2016-10-19 21:04:40

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: jgmenu

@damo, yeah I saw that and I do have some .desktop files around.

Offline

#53 2016-10-23 05:55:22

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

Re: jgmenu

For those interested in the python discussion.

I've pushed another commit and have changed a couple of things around the python script (jgmenu-parse-pmenu.py) which is called when you run 'jgmenu_run pmenu'. Thanks to @o9000 for helping us through this.

For most people it should just work, but if your system doesn't support
'#!/usr/bin/env python3' then have a look at the link below for a bit more detail:

https://raw.githubusercontent.com/johan … _on_python

As the installed version of jgmenu-parse-pmenu.py has been renamed, I recommend uninstalling any old version of jgmenu (by doing 'rm ~/bin/jgmenu*'

rm ~/bin/jgmenu*
cd ~/src/jgmenu        # or wherever you keep the git repo
git pull
make clean
make
make install

@brontosaurusrex: Does this solve it for you? If 'jgmenu_run xdg' works I guess you have gnome-menus installed. If it's still not working now, could you confirm that you have some .directory files in /usr/share/desktop-directories (or the equivalent on your OS). 'jgmenu_run pmenu' uses these .directory files to create the 'categories' in the menu.

Offline

#54 2016-10-23 17:00:37

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,063
Website

Re: jgmenu

malm wrote:

For most people it should just work, but if your system doesn't support
'#!/usr/bin/env python3' then have a look at the link below for a bit more detail:

https://raw.githubusercontent.com/johan … _on_python

I cloned a fresh tree on my OpenBSD -current system (with python3.5 installed to /usr/local/bin/python3.5) and used:

gmake
gmake install PYTHON3_POLYGLOT=1

The program then functions correctly with no modifications -- nice work!
smile

The neat thing about this solution is that I can keep python2.7 as the system default (for sysutils/ranger) and still use 3.5 for your program cool

Offline

#55 2016-10-24 07:53:08

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: jgmenu

@malm; fixed (somehow) by installing with

sudo make prefix=/usr install

More annoying questions
a. How to get rid of icons and those > signs at folder and back? (so far i set icon size to 0)
b. why do i have to click to folder to get in instead of just scrolling on it?
c. why can't I use back-arrow to travel back in tree?

Last edited by brontosaurusrex (2016-10-24 09:38:51)

Offline

#56 2016-10-24 20:17:59

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

Re: jgmenu

@Head_on_a_Stick: I'm glad it works. I think it was worth giving it some thought.

@brontosaurusrex: There are no annoying questions smile - bring them on.

a) if you set icon_size=0 (as you've done), the icons won't load. I.e. the program won't search for them or load them in the background. I'll annotate the docs/jgmenurc with some explainations.
jgmenu also has an --icon-size=<size> option. For example, you could do:

ls -1 /usr/bin | jgmenu --icon-size=0

(just need the filter support to make that useful!)

Regarding the ">" arrows, I'll add a option to hide/show.

b) Not sure I understand. Scroll up/down will scroll the menu items if there are more items than then window can display (as in the example above).
Happy to consider other UIs.
It's not top of the list, but at some point I'm thinking of opening submenus in new windows. That way, you should only need to hover over a submenu-item to open that submenu.
Could also do an expand/collapse of submenus within the root-menu-window, but I didn't have all these things in mind when I started writing jgmenu.c, so will have to restructure it a bit first.

c) Very good point! I think I've become blind to my only UI+code.
I'll implement that. That would give the user the option to get rid of the "Go back" items too.

Offline

#57 2016-10-24 22:19:53

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: jgmenu

b. I see, somehow I missed/ignored the single-window approach (which is nice otherwise).

Offline

#58 2016-10-25 06:36:59

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,547
Website

Re: jgmenu

malm wrote:

...at some point I'm thinking of opening submenus in new windows. That way, you should only need to hover over a submenu-item to open that submenu.

That would be nice. Having to click for sub-menus is a mild annoyance - behaviour like the openbox menu would be more congenial to me, anyway. smile


...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 )

Introduction to the Bunsenlabs Boron Desktop

Offline

#59 2016-11-26 23:59:17

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: jgmenu

plus one to the previous "request".
i would love for this to emulate openbox root menu behaviour as much as possible.
so, hovering + submenus is one thing, and then pop up under mouse, has this been talked about already?

Offline

#60 2016-11-27 09:16:21

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

Re: jgmenu

Thanks for the feedback @ohnonot. Getting the menu to pop up where the pointer is should be fairly trivial to achieve. I'll have a think about this.

Whilst I'm here, let me post some change since last time I wrote.

I've added a config option to hide the "submenu" arrow (in response to @brontosaurusrex's request). Just do

arrow_show = 0

You can also change the look of it using

arrow_string =

"Search" now works. When you've got the menu open, just start typing.  Assuming you're in the git repo top level directory, try

jgmenu_run csv --add-pmenu ./docs/default.csv

or just a simple

jgmenu_run pmenu

Then start typing something (e.g. "player") and it will filter on any item with "player" in the "name" or "command" fields. By default it will search all items (a bit like an application finder).
If you want to just search the current submenu (or root-menu), set

search_all_items=0

At the minute, the menu doesn't display the "search pattern" (although you'll see it in the terminal if you've opened the menu from there). We will support for this at some point, but want to tidy up jgmenu.c a bit first.

If you're in a submenu, "backspace" will take you back to the parent (thanks @@brontosaurusrex for suggesting this).

Some screen-shots for you:

Search (before typing)
RRqEsHrt.png

Search (after having typed)
eOZomlgt.png

Small csv menu on Ubuntu:
kZZaWbwt.png

Offline

Board footer

Powered by FluxBB