You are not logged in.
I was thinking: take scrot before launching menu, copy area where menu goes, blur it, the show it behind menu.
Might be better written in C and built into menu itself.
Offline
Is this a "bug", or have I missed a setting somewhere?
Widgets seem to require the full path to display an icon
@icon,,10,40,32,32,2,left,top,#000000 50,#000000 50,/usr/share/icons/Paper/512x512/places/folder_home.png
@icon,,10,40,32,32,2,left,top,#000000 50,#000000 50,folder_home
The first one shows, the second doesn't.
In the rc I have
icon_theme = Paper
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
Not a bug.
Icon lookup is pretty slow, so didn’t think it made sense for widgets. Fast start-up times is a priority.
In the main menu we use cache + a worker thread.
Offline
^ TY
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
Simple popup menus
Pipe menus, or static ones for that matter, don't have to be inside the main jgmenu menu.
It's much easier than with openbox to tie a menu to a button or launcher - you don't need xdotool and some keybind in rc.xml, just call the pipemenu and send it to jgmenu:
<pipemenu-command> | jgmenu --simple --icon-size=0
But launchers often don't support shell syntax like pipes, so it's neater to put the code inside the pipemenu itself.
If it's a bash script, just add this code at the top:
exec > >( jgmenu --simple --icon-size=0 --config-file=<( sed '/menu_padding_top/ s/^/#/' ~/.config/jgmenu/jgmenurc ) )
The exec call makes all subsequent standard output (eg anything from echo) go to the process in the brackets.
If you want the pipemenu to work inside a big jgmenu too, then call that line with an option, eg:
# look for a help option somewhere
for i in "$@"
do
case "$i" in
-h|--help)
echo "$HELP"
exit 0
;;
-s|--standalone)
# redirect stdout from this point
exec > >( jgmenu --simple --icon-size=0 --config-file=<( sed '/menu_padding_top/ s/^/#/' ~/.config/jgmenu/jgmenurc ) )
;;
esac
done
The weird config-file menu_padding stuff is because by default jgmenu will read ~/.config/jgmenu/jgmenurc which in BL's case adds some padding at the top to hold the search icon. You don't want this in a simple popup menu, but OTOH it is nice to have the menu styled in harmony with default jgmenu, hence the sed.
(The >( command ) syntax is process substitution and only works with bash, not sh.)
...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
^ very clever @johnraff.
Offline
Is there yet a way to make the jgmenu transparent? Just curious. If so where do I put it in the config?
Last edited by DeepDayze (2020-05-13 22:45:08)
Real Men Use Linux
Offline
Is there yet a way to make the jgmenu transparent? Just curious. If so where do I put it in the config?
In your jgmenurc; it's like tint2: color opacity
color
When a variable takes a color value, only the syntax #rrggbb aaa is recognised, where rr, gg and bb represent hexadecimal values (00-ff) for the colours red, green and blue respectively; and aaa stands for the alpha channel value expressed as a percentage (0-100) (i.e. 100 means no transparency and 0 means fully transparent.) For example #ff0000 100 represents red with no transparency, whereas #000088 50 means dark blue with 50% transparency.
So in your jgmenurc you'll have configurations like:
color_menu_bg = #171819 60
picom/compton needs to be running.
Last edited by PackRat (2020-05-13 23:30:05)
You must unlearn what you have learned.
-- yoda
Offline
DeepDayze wrote:Is there yet a way to make the jgmenu transparent? Just curious. If so where do I put it in the config?
In your jgmenurc; it's like tint2: color opacity
color
When a variable takes a color value, only the syntax #rrggbb aaa is recognised, where rr, gg and bb represent hexadecimal values (00-ff) for the colours red, green and blue respectively; and aaa stands for the alpha channel value expressed as a percentage (0-100) (i.e. 100 means no transparency and 0 means fully transparent.) For example #ff0000 100 represents red with no transparency, whereas #000088 50 means dark blue with 50% transparency.So in your jgmenurc you'll have configurations like:
color_menu_bg = #171819 60
picom/compton needs to be running.
Okay got it working. Just needed where to change the opacity on.
Real Men Use Linux
Offline
Hello,
I have two different themes in the .config/jgmenu/theme1 & theme2 is there a way - command to choose one of those two of my theme configs?
Offline
Do you mean the gtk theme, or different jgmenurc's?
jgmenu --config-file=<file>
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
Other than what @Damo suggested there is no builtin way to support this.
If running jgmenu as a long-running application (default), any change in jgmenurc will be detected, so you could write a script which copies either theme{1,2} to jgmenurc. E.g. toggle-theme.sh
Offline
Hi,
I have my own tint2rc themes and the match jgmenurc themes so basically when I change the tint2rc it detects is theme and like @malm suggested copies xxx.jgmenurc and renames it to jgmenurc.
Works thanks.
Offline
Would be nice to have a config option to add blur to the background transparency of the menu a la Windows 10, something like menu_background_blur = <0-100> where 0-100 is the percentage of blur desired. 0 for no blur, 100 for totally blurred.
Is this possible to add?
PS: Would love to see something like this in Tint2 as well so will ask about that idea to the Tint2 dev.
Last edited by DeepDayze (2021-03-24 21:15:41)
Real Men Use Linux
Offline
I do indeed remember
Suggest we start by producing a proof of concept application which grabs a region of the desktop and blurs it - preferably as a cairo surface.
We ought to write it in C and not save to harddisk.
From memory, tint2 has some code which grabs sections of the desktop (for the hover preview).
Not sure how blurring works. Couldn’t we just average the colours of neighbouring pixels or similar?
I’m tied up for a couple of days, but will do some research.
Offline
get_window_thumbnail()
in
https://gitlab.com/o9000/tint2/-/blob/m … l/window.c???
Offline
I fell like I am behind the times by a year or two.
Just an incredible piece of work.
Anyhow, The menu on the left is my current OB menu (in jgmenu), and the right is just my appends and prepends attached.
So, my understanding was that I could simply make and point to my own menu by using:
csv_cmd = cat ~/.config/jgmenu/mymenu.csv
And add entries to the file? but nope. I do not have this correct.
Terminal, lxterminal, utilities-terminal
File Manager, thunar, system-file-manager
Firefox, firefox, /usr/share/icons/ld-icons/firefox.png---ENTRY FOR THE APPS MENU GOES HERE----
Restart Openbox, openbox --restart, /usr/share/icons/ld-icons/pixmaps/logout_reboot.png
Reconfigure, openbox --reconfigure, /usr/share/icons/gnome/48x48/actions/redo.png
Exit, ld-logout, /usr/share/icons/ld-icons/exit4.png
^^^ Me keeping it simple. If I can get this working, and the Root apps menu in the center, I can figure everything else out!
So I need to know how to:
1. How to call my personal menu correctly. (cat ~/.config/jgmenu/mymenu.csv)? Guessing this isn't it.) And then, anything necessary in the menufile itself to be read correctly.
2. What do I use to display the "apps" menu inside of an entry (Debian). Basically I want to recreate my Openbox menu above using the jgmenu system, without using the OB feature. Point being easier editing of the menus etc . . (^root)? something?
3. Every Icon works but accessories here . . .(gnome). Just thought I should mention it.
4. Any other advise you may have for me.
Getting set up was a breeze, and the initial implementation gives a solid menu right out of the box. All of the customization possibilities are just neat. Looking forward to hours of working on this. Really nice.
Offline
1. It is exactly how you’ve described it. Try running jgmenu from the terminal so you can see any error messages if it’s not working.
killall jgmenu
jgmenu_run
2.
Debian,^pipe(jgmenu_run apps)
3. Run
jgmenu_run apps | grep -i accessories
Third field is icon name. Does that give us a clue why it’s not working?
Offline
Huh, getting an error in the terminal:
fatal: item 6 was not correctly terminated with a '\n'
Looks like the problem is item six in /mymenu? I deleted all but the terminal line, and it gave the same error but for "item 0" Tried adding the above \n . . . Didn't see this in any examples I found in your tutorial.
Better give you everything:
Mymenu:
Terminal, lxterminal, utilities-terminal
File Manager, thunar, system-file-manager
Firefox, firefox, /usr/share/icons/ld-icons/firefox.png
Debian,^pipe(jgmenu_run apps)
Restart Openbox, openbox --restart, /usr/share/icons/ld-icons/pixmaps/logout_reboot.png
Reconfigure, openbox --reconfigure, /usr/share/icons/gnome/48x48/actions/redo.png
Exit, ld-logout, /usr/share/icons/ld-icons/exit4.png
# verbosity = 0
# stay_alive = 1
# persistent = 0
# hide_on_startup = 0
csv_cmd = cat ~/.config/jgmenu/mymenu.csv
# tint2_look = 0
position_mode = pointer
# edge_snap_x = 30
# terminal_exec = x-terminal-emulator
# terminal_args = -e
# monitor = 0
# hover_delay = 100
# hide_back_items = 1
# columns = 1
# tabs = 120
# menu_margin_x = 0
# menu_margin_y = 0
menu_width = 170
# menu_height_min = 0
# menu_height_max = 0
# menu_height_mode = static
# menu_padding_top = 2
# menu_padding_right = 2
# menu_padding_bottom = 2
# menu_padding_left = 2
# menu_radius = 1
menu_border = 1
# menu_halign = left
# menu_valign = bottom
menu_gradient_pos = left
sub_spacing = 5
# sub_padding_top = auto
# sub_padding_right = auto
# sub_padding_bottom = auto
# sub_padding_left = auto
# sub_hover_action = 1
# item_margin_x = 1
# item_margin_y = 1
# item_height = 25
# item_padding_x = 2
# item_radius = 1
# item_border = 0
# item_halign = left
# sep_height = 5
sep_halign = center
sep_markup =
# font = Liberation Sans 11
# font_fallback = xtg
# icon_size = 22
# icon_text_spacing = 15
# icon_norm_alpha = 100
# icon_sel_alpha = 100
# icon_theme = gnome
# icon_theme_fallback = xtg
# arrow_string = ▸
# arrow_width = 15
color_menu_bg = #707874 100
color_menu_bg_to = #89918D 100
color_menu_border = #444D48 100
# color_norm_bg = #000000 00
color_norm_fg = #0D0B0B 100
color_sel_bg = #57615E 100
color_sel_fg = #C9DBD9 100
color_sel_border = #57615E 100
color_sep_fg = #293231 100
# color_scroll_ind = #eeeeee 40
color_title_fg = #0D0B0B 100
color_title_bg = #767D79 100
color_title_border = #767D79 100
# csv_name_format = %n (%g)
# csv_single_window = 0
# csv_no_dirs = 0
# csv_i18n =
# csv_no_duplicates = 0
And for the accessories icon:
sleekmason@ai2:~$ jgmenu_run apps | grep -i accessories
Accessories,^checkout(apps-dir-Accessories),applications-accessories
^tag(apps-dir-Accessories)
I do have lx-menu installed as well. Everything else is groovy.
Last edited by sleekmason (2021-03-26 19:21:20)
Offline
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
Offline