You are not logged in.
What editor do you use?
What happens if you just add a new empty line at the end of the file.
Does it work if you delete jgmenu.c lines 1239+1240?
https://github.com/johanmalm/jgmenu/blo … nu.c#L1239
-----
Ha! That was ridiculous on my part:) A new line at the end did indeed do the trick. Wonderful! This is going to be a blast:) Thank you for your hard work!
Offline
So any entries inside the Debian "apps" menu do not have icons . . Is there a generic addition to add icons to the menu? (for that matter, to the "Debian" entry as well. Cant just add the path like I would for a regular entry?) *edit - Yes!.
No worries either way here, as it never did with the Openbox menu either. (well some, but not many.)
Edit* Ha! Got the icon issue sorted for the "Debian" entry itself. Didn't kill and restart.
So only thing left is inside the pipe menu to apps.
Last edited by sleekmason (2021-03-27 00:12:48)
Offline
Hi.How to properly launch this prepend.csv:
All Applications,^checkout(apps),utilities
^sep()
^tag(apps)
It works when launched via jgmenu_run or simply jgmenu, but if I want to directly specify prepend.csv and launch it using jgmenu --csv-file=~/.config/jgmenu/prepend.csv, then hovering the mouse cursor over "All Applications" does not trigger the dropdown menu with program categories.
Offline
Hi Majestic
^tag(apps)
defines the start of a submenu definition. Unless you then provide some content after that point, there will be nothing to show.
prepend.csv and append.csv are read by the jgmenu-apps module. Try just running
jgmenu_run apps
...and you'll see what the output looks like.
Hopefully that makes sense.
Offline
Hi Majestic
^tag(apps)
defines the start of a submenu definition. Unless you then provide some content after that point, there will be nothing to show.
prepend.csv and append.csv are read by the jgmenu-apps module. Try just running
jgmenu_run apps
...and you'll see what the output looks like.
Hopefully that makes sense.
You probably didn’t understand—the same file is displayed differently depending on the launch method.
Offline
You probably didn’t understand—the same file is displayed differently depending on the launch method.
Maybe, but it seems pretty clear. Let me think of another way to describe it...
When you launch with jgmenu_run it is in effect the same as
jgmenu_run apps | jgmenu --simple
When you run with jgmenu --csv-file=prepend.csv that is like doing
cat prepend.csv | jgmenu --simple
So, if you study the output of "jgmenu_run apps" you will note that it is different from the content of prepend.csv and therein lies the reason for the different behavior.
If you now look at my post at 19:13 it will hopefully make more sense.
Offline
Majestic wrote:You probably didn’t understand—the same file is displayed differently depending on the launch method.
Maybe, but it seems pretty clear. Let me think of another way to describe it...
When you launch with jgmenu_run it is in effect the same as
jgmenu_run apps | jgmenu --simple
When you run with jgmenu --csv-file=prepend.csv that is like doing
cat prepend.csv | jgmenu --simple
So, if you study the output of "jgmenu_run apps" you will note that it is different from the content of prepend.csv and therein lies the reason for the different behavior.
If you now look at my post at 19:13 it will hopefully make more sense.
Yes, you provided the correct comparison, but unfortunately, it didn’t solve the problem.
I want to create a custom user menu, mymenu.csv, based on an existing one and use it in another location. One of the items is All Applications, with a dropdown list of program categories and the programs themselves. As I understand it, jgmenu_run works with default files. Perhaps you could suggest how to create such a custom menu and launch this menu not from the default configuration folder:
At the moment, I’ve solved the issue using two scripts that rewrite ~/.config/jgmenu/jgmenurc and ~/.config/jgmenu/prepend.csv before launching jgmenu_run, but I think this is a temporary solution and there should be a more correct method.
Last edited by Majestic (2024-12-29 21:08:01)
Offline
Hi Johan, I'm a real jgmenu novice, so please be kind. :-) I have been using Xfce and its Whiskers menu on MX Linux, but recently decided to try a lighter environment to keep my ancient laptop cooler. I have set up a jwm environment so without all the Xfce hooks. I needed a better menu system than jwm had, so installed and started using jgmenu. Love it!
However, I missed having a "Favorites" sub-menu as I had in Xfce Whiskers, so I cobbled together a setup that generates an all apps csv menu, then builds a main menu by concatenating it with a front-end static file that defines the top boxes with a search box and a "Favorites" selection tag, then I run a script that uses a "favorites.txt" file to select entries from the main menu that get appended to the new main menu csv file. Works great! One script re-generates the files, but manually.
So one of my questions is, can a "hooks" rule somehow be set up to have this script run automatically, say when the /usr/applications directory is updated (an app added or removed)?
Another question relates to how to build a menu setup that allows me to select a menu item to be either added to or removed from, the favorites seed file ("favorites.txt" is what I use now but could be a .csv?). Any thoughts on how to implement that?
Thanks for this wonderful tool! It's way more complex than it seems on the surface! Hope to learn more.
Offline
Hi @malm, et al., I'm back. I did manage to cobble together scripts to make my desired menu system with a "Favorites" section. That was then, but I moved to a different distro, imported (?) and adapted my scripts to do the same thing. Everything works except when I select an app (or whatever) from the menu, nothing happens.
On the other hand, if it search for an app, click on it, and press Enter, it works. Is there a setting I'm missing?
Offline
Hi Durhammer
Not Malm here, but,
Are you familiar with the prepend.csv and append.csv files that jgmenu uses for fixed, user-supplied menu entries?
Those are what I have used for my "favorites" menu items. These user-supplied menu entries appear above all the menu entries that jgmenu magically generates (I assume from XDG desktop files). If you aren't familiar with these two files, then I suggest you check out the docs at https://jgmenu.github.io/
For example, I have the following prepend.csv file in my ~/.config/jgmenu/ directory:
Geany,geany,/usr/share/icons/hicolor/16x16/apps/geany.png
VirtualManagar,/usr/bin/virt-manager,/usr/share/icons/hicolor/48x48/apps/virt-manager.png
QEMU-Windows-7,/home/ben/bin/run_vm_win7-48.sh user,/usr/share/icons/icons8-windows-xp-48.png
So basically a csv file, where...
1st field is the application name to appear in the menu
2nd field is the name of the executable or script to be run to start the application
3rd field is the path/file name of an image file to be displayed as an icon in the menu next to the application name.
On the other hand, if you ARE familiar with the prepend.csv and append.csv files used by jgmenu, then I probably misunderstood your question. I confess I didn't really follow much of what you described for how you are using jgmenu and I was just guessing at what you were trying to do.
Cheers
Offline
Hi @tynman,
First of all, thanks for replying! I was beginning to think this was a dead-thread....
Yes, I know about prepend csv files and such. I've got my framework working with a "favorites" menu "category", and it worked well on a previous (MX Linux Fluxbox edition but running either IceWM or jwm) installation. I'm now working in Q4OS using IceWM and my jgmenu setup isn't really working properly anymore. The search box works fine -- enter text to search for an app, and press Enter and the app pops up. But when I mouse through the categories to a menu selection, and click on it, it doesn't launch.
I've done some testing and have narrowed it down to something in my custom "search" and rectangles block. With those lines included, the categories-menu-item selection works properly and launches an app. If I add the custom block at the top, only the search stuff works.
Here's a sample without the search stuff that works as a proper menu:
Favorites,^checkout(favorites),/usr/share/icons/Adwaita/48x48/legacy/emote-love.png
^sep()
Accessories,^checkout(apps-dir-Accessories),applications-accessories
Development,^checkout(apps-dir-Development),applications-development
^tag(apps-dir-Accessories)
Ark (Archiving Tool),ark,ark,,#Qt#KDE#Utility#Archiving#Compression#X-KDE-Utilities-File
Bulk Rename,thunar --bulk-rename,org.xfce.thunar,,#Utility#Core#GTK#Filesystem
Emoji Selector,plasma-emojier,preferences-desktop-emoticons,,#Qt#KDE#Utility
FeatherPad (Text Editor),featherpad,featherpad,,#Qt#Utility#TextEditor
^tag(favorites)
AisleRiot Solitaire,sol,gnome-aisleriot,,#GNOME#GTK#Game#CardGame
Brave Web Browser (Web Browser),/usr/bin/brave-browser-stable,brave-browser,,#Network#WebBrowser
Cantata (Music Player Client),cantata,cantata,,#Qt#KDE#AudioVideo#Player
Mahjongg,gnome-mahjongg,org.gnome.Mahjongg,,#GNOME#GTK#Game#BoardGame
And here is the same csv but with the search block at the top, where only search works:
@rect,,154,4,292,36,2,left,top,#000000 0,#656565 50,
@search,,159,4,240,36,2,left,top,#eeeeee 80,#000000 0,
@icon,,416,12,22,22,2,left,top,#000000 50,#000000 50,.config/jgmenu/greeneye-search.svg
@rect,,154,44,292,462,2,left,top,#000000 0,#282828 90,
@rect,^filter(*),4,4,142,35,2,left,top,#000000 0,#000000 0,
@text,,9,4,142,35,2,left,top,#e6e6e6 100,#000000 0,Search All here ====>
Favorites,^checkout(favorites),/usr/share/icons/Adwaita/48x48/legacy/emote-love.png
^sep()
Accessories,^checkout(apps-dir-Accessories),applications-accessories
Development,^checkout(apps-dir-Development),applications-development
^tag(apps-dir-Accessories)
Ark (Archiving Tool),ark,ark,,#Qt#KDE#Utility#Archiving#Compression#X-KDE-Utilities-File
Bulk Rename,thunar --bulk-rename,org.xfce.thunar,,#Utility#Core#GTK#Filesystem
Emoji Selector,plasma-emojier,preferences-desktop-emoticons,,#Qt#KDE#Utility
FeatherPad (Text Editor),featherpad,featherpad,,#Qt#Utility#TextEditor
^tag(favorites)
AisleRiot Solitaire,sol,gnome-aisleriot,,#GNOME#GTK#Game#CardGame
Brave Web Browser (Web Browser),/usr/bin/brave-browser-stable,brave-browser,,#Network#WebBrowser
Cantata (Music Player Client),cantata,cantata,,#Qt#KDE#AudioVideo#Player
Mahjongg,gnome-mahjongg,org.gnome.Mahjongg,,#GNOME#GTK#Game#BoardGame
Maybe something has changed with the @search or @rect directives since my first setup on MX Linux. I dunno.
Anything you or anyone else can spot would be great! Thanks!
Offline
Hah -- finally figured it out, thanks to reviewing lots of other examples and realizing that the "^filter(*)" directive actually not needed for the search widget. deleted that from the second .csv and it all works again. Maybe when I had used it before, it then was a bug, or now it is a bug, but either way, I'm good.
Offline