You are not logged in.

#226 2019-07-04 21:43:01

DeepDayze
Member
From: In Linux Land
Registered: 2017-05-28
Posts: 709

Re: jgmenu

Wow misko...that looks like some great work and Malm has to be amazed!


Real Men Use Linux

Offline

#227 2019-07-05 09:45:21

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

Re: jgmenu

^ https://www.youtube.com/watch?v=pYL6g_Dw_4U

I'm hoping when there are ways to integrate jgmenu into mainsteam panels, more people will contribute to this menu. Who knows, some future GUI to easily configure jgmenu would be very usefull and would work across the DE's and panels.
Useful for those distros that offer several DEs.
One menu to rule them all. devil

Jgmenu has advantages comparing to other menus in those panels.
Hope it will have an option to follow gtk/qt theming some day.

Offline

#228 2019-07-05 15:53:08

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

Re: jgmenu

@misko awesome! I’ll be installing panels tonight to check this out.

Offline

#229 2019-07-05 15:58:10

DeepDayze
Member
From: In Linux Land
Registered: 2017-05-28
Posts: 709

Re: jgmenu

misko_2083 wrote:

^ https://www.youtube.com/watch?v=pYL6g_Dw_4U

I'm hoping when there are ways to integrate jgmenu into mainsteam panels, more people will contribute to this menu. Who knows, some future GUI to easily configure jgmenu would be very usefull and would work across the DE's and panels.
Useful for those distros that offer several DEs.
One menu to rule them all. devil

Jgmenu has advantages comparing to other menus in those panels.
Hope it will have an option to follow gtk/qt theming some day.

Yup, with such features jgmenu will be the biggest killer app  cool


Real Men Use Linux

Offline

#230 2019-07-14 11:29:52

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

Re: jgmenu

@misko

The plugins seem to work fine provided:

  - we set "at_pointer = 1" in jgmenurc
  - launch using jgmenu_run

Let me attempt to explain how it works. For the purposes of terminology, I'll assumem we're using a horizontal panel.

  - Vertically we align to the edge of the panel by reading _NET_WORKAREA (a freedesktop EWMH root window property).
  - Horizontally we use the pointer X co-ordinate, which is why the menu is not aligned to the left/right hand edge of the button.

During early development of jgmenu, @o9000 and I wanted jgmenu to be able to behave as a native tint2 menu, but without tint2 having to do the hard work. To achieve this, we let tint2 set some environment variables on exec including TINT2_BUTTON_ALIGNED_{X1,X2,Y1,Y2}.

If 'tint2_look=1' in jgmenurc, jgmenu_run reads these environment variables and passes them via a unix socket to the long-running instance of jgmenu. On 'wake up' (=show menu), jgmenu aligns the menu to these variables.

The above method allows jgmenu to correctly position itself even in complex situations such as 'panel_shrink=1' in tint2rc (where the panel will shrink to a compact size dynamically)

In order to make this features avaialble to other panels, we would need to re-factor the code a bit to cut the dependence on other tint2 variables. This is not a big deal, but I'm reluctant to go hacking around too much until lithium is out. jgmenu is having a cool-off period smile

Going forward I suggest the following:

Add new config option

position_mode = ( ptr | ipc | fixed )

ptr - launch at pointer
ipc - use inter-process communication to read variables set by panel
fixed - based on margin_x, etc in jgmenurc

I suggest that ptr and fixed should respect _NET_WORKAREA, which is what generally makes jgmenu aligh accurately out-of-the-box with EWMH compliant WMs/panels.

We can be backward compatible by setting postition_mode=ptr if at_pointer==1

For the time being, I have added the xfce4-panel-plugin to contrib/ in the jgmenu repo.
I'll do the same with the mate-panel plugin shortly.

Re gtk/qt theming - we're part way there. The following works for many gtk themes.

jgmenu init --apply-obtheme

To parse actual gtk3 themes looks tricky. I haven't explored how gtk apps do it, but prefer not to make the whole gtk stack a dependency of jgmenu.
Appreciate any help in this area...

Offline

#231 2019-07-14 11:37:42

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

Re: jgmenu

misko_2083 wrote:

One menu to rule them all

Can we change @misko_2083's Title to Chief Promoter. I just like to write code angel

Offline

#232 2019-07-15 03:47:31

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 5,472
Website

Re: jgmenu

^@misko OK? Easily done.


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

Offline

#233 2019-07-19 04:07:47

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

Re: jgmenu

^Thank you. No need for a title.

@malm Thank's for all the info.
Xfce panel sets the panel strut which changes _NET_WORKAREA.
But there is a setting to turn that behavior off.

Those TINT2 variables are pretty handy.
https://i.imgur.com/OoTbFTR.mp4
Xfce-panel has floating panel positions, I'm still figuring out where to position the menu in those cases.

For now tint2rc has to be edited manually to inform the jgmenu where the panel is positioned.

Parsing gtk3 themes looks tricky.
I have a py script that parses entire css (from the internet, no idea who the author is).

#!/usr/bin/env python3

import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk

gset = Gtk.Settings.get_default ()
themename = gset.get_property ("gtk-theme-name")
prefdark = gset.get_property ("gtk-application-prefer-dark-theme") # it's a boolean
cprov = Gtk.CssProvider.get_named (themename)
print (cprov.to_string())

It a pitty that color-hash property is deprecated. https://lazka.github.io/pgi-docs/Gtk-3. … tings.html
Hope the only way to get the color isn't in digging through the CSS.

Offline

Board footer

Powered by FluxBB