You are not logged in.

#261 2020-02-27 18:42:26

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

Re: jgmenu

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

#262 2020-03-02 12:22:13

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

Re: jgmenu

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

#263 2020-03-02 17:18:06

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

Re: jgmenu

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

#264 2020-03-02 18:24:22

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

Re: jgmenu

^ 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

#265 2020-05-01 01:46:58

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

Re: jgmenu

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 )

Introduction to the Bunsenlabs Boron Desktop

Online

#266 2020-05-01 19:57:59

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

Re: jgmenu

^ very clever @johnraff.

Offline

#267 2020-05-13 22:44:34

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,897

Re: jgmenu

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

#268 2020-05-13 23:28:58

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,611

Re: jgmenu

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

example jgmenurc

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

#269 2020-05-14 00:16:40

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,897

Re: jgmenu

PackRat wrote:
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

example jgmenurc

picom/compton needs to be running.

Okay got it working. Just needed where to change the opacity on.


Real Men Use Linux

Offline

#270 2020-09-11 22:25:07

peterk
Member
Registered: 2017-10-27
Posts: 8

Re: jgmenu

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

#271 2020-09-11 23:32:36

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

Re: jgmenu

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

#272 2020-09-12 06:05:06

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

Re: jgmenu

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

#273 2020-09-13 18:30:55

peterk
Member
Registered: 2017-10-27
Posts: 8

Re: jgmenu

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

#274 2021-03-24 21:14:01

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,897

Re: jgmenu

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

#275 2021-03-24 21:25:05

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

Re: jgmenu

I do indeed remember big_smile

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

#276 2021-03-24 21:47:05

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

Re: jgmenu

Offline

#277 2021-03-26 13:13:28

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,103
Website

Re: jgmenu

I fell like I am behind the times by a year or two. roll

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!

jgmenu-test.png

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

#278 2021-03-26 15:01:07

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

Re: jgmenu

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

#279 2021-03-26 19:19:35

sleekmason
zoom
Registered: 2018-05-22
Posts: 1,103
Website

Re: jgmenu

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

#280 2021-03-26 21:33:15

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

Re: jgmenu

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

Board footer

Powered by FluxBB