You are not logged in.

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

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,593

Re: jgmenu

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

Offline

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

damo
....moderator....
Registered: 2015-08-20
Posts: 4,378

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

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

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

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,593

Re: jgmenu

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

Offline

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

malm
jgmenu developer
Registered: 2016-10-13
Posts: 227
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

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

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
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


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

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

Offline

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

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,593

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

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

malm
jgmenu developer
Registered: 2016-10-13
Posts: 227
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

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

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,593

Re: jgmenu

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

Offline

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

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 4,673
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


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

Offline

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

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

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

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

malm
jgmenu developer
Registered: 2016-10-13
Posts: 227
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

#62 2016-11-28 22:10:37

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

Re: jgmenu

@ohnonot: I've just pushed a commit which allows you to launch the menu at the pointer.
Just add

at_pointer = 1

to your jgmenurc.
Alternatively, use the command line option --at-pointer with jgmenu or "jgmenu_run pmenu".

Offline

#63 2016-11-29 05:58:17

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

Re: jgmenu

thanks, this seems to be working just fine, after adding said option to jmenurc.

but, i'm a little confused now.
i installed a few days ago your latest release (from the aur package) and just now cloned your repo which installs to ~/bin by default, so i have 2 versions now:

$ /usr/bin/jgmenu --version
jgmenu v0.4.3
$ jgmenu --version
jgmenu v0.4.3-12-g3d4d

thing is, BOTH versions display the menu at the mouse pointer now???
yikes

Offline

#64 2016-11-29 14:03:27

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

Re: jgmenu

Hm, what am I doing wrong? First I installed all the packages given on the github page for #bĹ. After that downloaded the ZIP file and extracted it. In the jgmenu-master folder I used "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    compat.o
     CC    jgmenu.o
     LINK  jgmenu
     CC    jgmenu-parse-xdg.o
     LINK  jgmenu-parse-xdg
     CC    jgmenu-icon-find.o
     LINK  jgmenu-icon-find
     CC    jgmenu-xsettings.o
     LINK  jgmenu-xsettings

After "make install" - nothing happens. I have lxmenu-data and pandoc.

Last edited by martix (2016-11-29 14:12:33)

Offline

#65 2016-11-29 21:33:26

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

Re: jgmenu

@ohnonot: I'm glad it's working. That's interesting regarding the two versions. What happens if you run like this:

jgmenu-parse-pmenu.py | /usr/bin/jgmenu
jgmenu-parse-pmenu.py | ~/bin/jgmenu

Do both launch at pointer? Did you run it with jgmenu_run before?

@martix: It looks like it's compiled fine. "make install" should have copied some executable files to ~/bin/

What happens if you try to run

jgmenu_run pmenu

If that doesn't work, check if the files have been installed to ~/bin. There should be various files beginning with "jgmenu"

Have you checked your your $PATH?

echo $PATH

If /home/martix/bin is not in your path, do

export PATH=$HOME/bin:$PATH

Then try "jgmenu_run pmenu" again.

Last edited by malm (2016-11-29 21:36:51)

Offline

#66 2016-11-30 07:04:12

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

Re: jgmenu

malm wrote:

@ohnonot: I'm glad it's working. That's interesting regarding the two versions. What happens if you run like this:

jgmenu-parse-pmenu.py | /usr/bin/jgmenu
jgmenu-parse-pmenu.py | ~/bin/jgmenu

yes, that shows the expected behavior, and explains why both versions popped up at the pointer before.
I guess you have to work on the internal paths to all those scripts, because that shouldn't happen.
I'd actually move most of the scripts out of $PATH, maybe /usr/lib/jgmenu...

Offline

#67 2016-11-30 15:28:27

misko_2083
Member
Registered: 2016-05-24
Posts: 93

Re: jgmenu

This is awesome.
Also useful for yad form button and thunar custom actions.

#!/bin/bash

function setdef
{
 printf "First,echo '1:8!0..12!1';echo '2:1!50..2000!1'\nSecond,echo '1:5!0..12!1';echo '2:200!50..2000!1'" \
 | jgmenu --config-file=$HOME/jgmenurc
}
export -f setdef

yad --form --field="value 1:":NUM '8!0..12!1' \
    --field="value 2:":NUM '300!50..2000!1' \
    --field="Set value:fbtn" '@bash -c "setdef %2"' 
#jgmenurc config file
at_pointer	  = 1

http://i66.tinypic.com/5fn39s.gif

Offline

#68 2016-11-30 17:41:13

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

Re: jgmenu

@malm Thank you! It works now (bin was empty, did "make install" again and jgmenu_run pmenu worked this time)!

This is awesome, I was missing something like this menu. I would like to use it via plank icon, it'll be a great improvement.

Offline

#69 2016-11-30 20:35:06

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

Re: jgmenu

@ohnonot: Yes, I have been thinking about this. If you're happy to bear with me for a while, I'll pick a "renaming" day at some point. I'm thinking of hard-coding the "lib" path in jgmenu_run during the build-process. We could then put jgmenu and jgmenu_run in /usr/bin/ and the rest in /usr/lib/jgmenu/ (or something along those lines). It would be cleaner. :-)

@misko_2083: I love it! A bit of direct usage of the jgmenu binary. How did you do the screen capture?

@martix: I did try it with plank the other day and it seemed to work fine. The build-process creates a desktop file in ~/.local/share/applications/ - I've put some notes about it in the README.md.
I don't know much about plank or desktop files though, so do shout if there are better ways of doing it. Plank only seemed to find the icon if I hard-coded the full path.

Offline

#70 2016-12-01 06:23:44

misko_2083
Member
Registered: 2016-05-24
Posts: 93

Re: jgmenu

malm wrote:

How did you do the screen capture?

With the SimpleScreenRecorder, then converted to gif by ffmpeg and imagemagic.

cd Videos
ffmpeg -i yad-form.mkv -vf scale=500:-1 -r 10 -f image2pipe -vcodec ppm - |  convert -delay 5 -loop 0 - yad-form.gif

But I should have limited the loop to 3 cycles. smile
Then I posted to http://tinypic.com

Offline

#71 2016-12-01 12:27:31

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

Re: jgmenu

@malm Yes, thank you, simpy drag-and-drop jgmenu.desktop to Plank did work great. On default there is an ubuntu-like logo. After changing the Icon line in jgmenu.desktop to

Icon=distributor-logo-bunsenlabs

it looks very nice with the #bĺ logo (thank you damo for mentioning).

I already started using it frequently, it's like an early christmas gift. Some sidenotes: Krita has multiple entries for me (14 times) in "Office" but I had crashes with it before. I was wondering if the "go back" arrow could be aligned to the other side (was thinking about a mirrored arrow), but atm I just set it to "0". Somehow "at pointer = 1" does not open submenus after hoovering, neither starting it from terminal with --at-pointer. I have "Faenza Dark" icon theme and there are icons for around 2/3 of the entries.

Offline

#72 2016-12-02 21:46:50

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

Re: jgmenu

malm wrote:

If you're happy to bear with me for a while, I'll pick a "renaming" day at some point.

i'm perfectly happy to bear with you! thanks for this little gem of an app.

Offline

#73 2016-12-02 22:15:03

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 396
Website

Re: jgmenu

martix wrote:

On default there is an ubuntu-like logo. After changing the Icon line in jgmenu.desktop to

Icon=distributor-logo-bunsenlabs

it looks very nice with the #bĺ logo (thank you damo for mentioning).

https://github.com/BunsenLabs/bunsen-fa … e/issues/3

Offline

#74 2016-12-03 07:48:43

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

Re: jgmenu

@misko_2083: Thanks. I'll try it!

@martix: Thanks for your feedback. I appreciate it.

In order to avoid having to edit jgmenu.desktop everytime you do "make install", you can create a config.mk and add this line to it:

JGMENU_DESKTOP_ICON="distributor-logo-bunsenlabs"

I will soon make the "go back" items populate automatically rather than having to feed to stdin. I think that would be a good time to add an alterative arrow.

Hovering doesn't work (yet!) - you have to click. You shouldn't see different behaviour with --at-pointer=1 with respect to sub-menus. Please shout if you do and I'll investigate :-)

Are you happy to help me debug regarding the Faenza-Dark icons? I am keen to understand if the icons exist or if jgmenu is at fault?

Try "jgmenu_run cache --verbose" to see if there are icons which cannot be found.

Alternatively, the following line will show you what gets fed to stdin

jgmenu_run parse-pmenu

To search for an icon on your system, do:

find /usr/share/icons -name "*foo*"

replacing "foo" with the icon name.

Regarding the krita issue, have you got more than one desktop file relating to it? Or are there multiple entries in the krita file? The following two should help investigate:

find /usr/share/applications -name "*krita*"
jgmenu_run parse-pmenu | grep -i 'krita'

Offline

#75 2016-12-03 14:34:34

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

Re: jgmenu

Thank you for the hints and explanations! at-pointer=1 made indeed no difference (as a sidenote regarding hovering: I used to have the launcher Lancelot, which had a small arrow to hover over it in order to open submenus and apps. I loved that solution.)

When I run - as suggested - "cache --verbose", at every entry, where no icon is shown, there was a "could not find icon" warning. As an example: In "Accessoires" I have a "Contacts" entry, which is for gnome-contacts. When I open it, there is the gnome-contacts icon in tint2, showing a "@" on red background. However the command above gave me a  "could not find icon 'x-office-address-book'". When I did search for "Contacts" in /usr/share/icons, it found the pngs under Faenza/Apps/16 22 24 etc. named "gnome-contacts.png".

Otherwise I do have an icon for Internet in the main menu ("applications-internet"), but no icon for the rest (except "Other"), which are called "applications-accessoires", "applications-games", etc. It's a bit strange as there are pngs in /usr/share/icons/Faenza/categories/16 22 etc. called applications-games.png or applications-multimedia.png (could NOT find icons for "accessoires" though).

As for Krita: It has a proper entry under "Graphics". The other entries in "Office" had something to do with several Krita*.desktop files in "/applications/kde4" (thank you for the command!). I deleted the files - problem solved. I also had some useless "Knetattach", "Kmailservice", "Ktelnetservice", "Nepomukbackup", "Calligra" entries, which were also a Krita issue (just removed them). It works great otherwise, love to have it in Plank.

Some sidenotes: I noticed several entries for command line stuff, like feh, vim or htop (although it's good as I did not remember I had feh). When the submenu-list is too long, one has to scroll down manually. Somehow I had three entries for banshee and two for Zathura but it could be solved the same way as the Krita issue.

Offline

Board footer

Powered by FluxBB