You are not logged in.

#276 2019-11-15 14:12:24

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

Re: jgmenu

ekzotic wrote:

Is it possible to remove red borders in menu from lithium theme?

Tried to edit jgmenu config and it did not work

Do you mean the red highlight of the selected menu item?

Many aspects of the Openbox theme can be edited as you like in /usr/share/themes/<theme name>/openbox-3/themerc - look at the Menu settings section.

I suggest that you copy the theme to ~/.local/share/themes and edit that version (it will appear in Menu->Preferences->Openbox->WM Preferences after you do openbox --reconfigure)


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

#277 2019-11-15 15:14:31

ekzotic
Member
Registered: 2019-11-07
Posts: 27

Re: jgmenu

Thanks! I mean this
9oIS4ym.png

Tried and did not work or I'm doing it wrong  smile
I see images like this in gtk2 folder, don't know how to configure it.
Well I have idea to replace filenames in gtk config

Last edited by ekzotic (2019-11-15 17:35:12)

Offline

#278 2019-11-16 06:10:46

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,123
Website

Re: jgmenu

^ The latest bunsen-themes (uploaded yesterday) has the new Yeti and Yeti-Lith themes by @cog. You could try them.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#279 2019-11-16 06:14:27

cog
Cattle Baron
From: New Mexico, USA
Registered: 2015-10-27
Posts: 462
Website

Re: jgmenu

^ none of the Yeti's have red borders but Yeti-Lith does have red text in menus.  It's the lithium red iteration if anyone might want that sort of thing.


Morning, Bunny.  Well, I can see you're in good health.  -George Washington McLintock! (John Wayne, AKA the Duke)

Offline

#280 2019-11-16 10:46:49

ekzotic
Member
Registered: 2019-11-07
Posts: 27

Re: jgmenu

Thanks guys! I got them. Are they only openbox themes, not full BLOB themes? And there are borders still but they are grey and less noticable now. Is there a way to get rid of them completely?

Offline

#281 2019-11-16 10:52:10

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

Re: jgmenu

@cog you can set the border color in the config file ~/.config/jgmenu/jgmenurc
https://github.com/johanmalm/jgmenu/blo … gmenu.1.md
eg:
color_sel_border = #eeeeee 100

Last edited by misko_2083 (2019-11-16 10:52:39)


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

#282 2019-11-16 11:14:09

ekzotic
Member
Registered: 2019-11-07
Posts: 27

Re: jgmenu

This setting does't work for me. Also if you sync jgmenu with openbox it gets reverted.

Offline

#283 2019-11-16 16:11:04

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

Re: jgmenu

The themes themselves are set by the OB and gtk themes, BLOB just saves whichever set of themes you currently have.


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

#284 2019-11-16 19:48:21

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

Re: jgmenu

ekzotic wrote:

Is it possible to remove red borders in menu from lithium theme?

Tried to edit jgmenu config and it did not work

I’ll implement this for the next release.

See https://github.com/johanmalm/jgmenu/issues/103

Offline

#285 2019-11-17 03:30:20

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,123
Website

Re: jgmenu

ekzotic wrote:

This setting does't work for me. Also if you sync jgmenu with openbox it gets reverted.

When you want to change a theme you have to set both GTK and Openbox themes (presuming the theme you want is available for both).
ie
menu>Preferences>Appearance
then
menu>Preferences>Openbox>WM Preferences
then
menu>Preferences>jgmenu>Sync Theme with Openbox

EDIT forgot:
menu>Preferences>Notifications (for notification popup theme)

Last edited by johnraff (2019-11-18 02:30:11)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#286 2019-11-17 08:43:50

ekzotic
Member
Registered: 2019-11-07
Posts: 27

Re: jgmenu

malm wrote:

I’ll implement this for the next release.

See https://github.com/johanmalm/jgmenu/issues/103

Thanks a lot!

@johnraff thanks, figured it out already, was quite confusing in the beginning though.

Offline

#287 2020-02-23 07:50:56

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

Re: jgmenu

More fun with jgmenu:
First made jgmenu semi transparent in jgmenurc

color_menu_bg       = #C8CFCB 50

Then installed xdotool, xloadimage and yad.
Made the script that opens a yad dialog and jgmenu, finds jgmenu's position and dimensions and positions yad behing the jgmenu.
Then xloadimage draws on yad window while still behind jgmenu.
When jgmenu is unmapped, the scipt detects that and closes yad too.
fun


*I have two simple images in /usr/share/backgrounds/xfce/*.jpg, change that part.

#!/bin/bash

jgmenu_run config -s ~/.config/jgmenu/jgmenurc -k position_mode -v pointer

unset x
unset y
unset w
unset h
yad --class tab-slideshow --text="\n\n\n\t\t\tLoading" --no-buttons --undecorated --skip-taskbar & TAB_PID=$!
jgmenu_run & disown $!
# Wait untill the tab is created, that is until window name appears
until xdotool getwindowname $(xdotool search --onlyvisible --any --pid $TAB_PID --class "tab-slideshow" 2>/dev/null | tail -1) >/dev/null 2>&1; do
        # sleep until the window opens
        sleep .1
done

# Decimal window id
WindowID="$(xdotool search --onlyvisible --class "tab-slideshow" 2>/dev/null | tail -1)"

# Hexadecimal, that's what xloadimage accepts
WindowIDHex=$(printf "0x%08x" ${WindowID})

ID="$(xwininfo -name jgmenu | grep -m 1 -o " \+0x[0-9a-f]\+")"
ID="${ID/ /}"

eval $(xwininfo -id $ID |
            sed -n -e "s/^ \+Absolute upper-left X: \+\([0-9]\+\).*/x=\1/p" \
                   -e "s/^ \+Absolute upper-left Y: \+\([0-9]\+\).*/y=\1/p" \
                   -e "s/^ \+Width: \+\([0-9]\+\).*/w=\1/p" \
                   -e "s/^ \+Height: \+\([0-9]\+\).*/h=\1/p" )

xdotool windowmove  $WindowIDHex $x $y
xdotool windowsize  $WindowIDHex $w $h
while true; do
        for NAME in /usr/share/backgrounds/xfce/*.jpg; do
            MapState="$(xwininfo -id $ID | grep -o "Is.*" )"

            if [[ "${MapState}" == "IsUnMapped" ]]; then
               kill -9 $TAB_PID
               exit
            fi

           xloadimage -windowid $WindowIDHex "$NAME" -quiet 2>/dev/null
           #Set duration here
           sleep .5
       done     
done & XLOAD_IMAGE=$!

wait $TAB_PID 2>/dev/null

killall jgmenu
exit 0 

next is grabing and moving jgmenu with xdotool, well sort of
Pressing Escape closes jgmenu

#!/bin/bash

jgmenu_run config -s ~/.config/jgmenu/jgmenurc -k position_mode -v pointer

jgmenu_run & disown $!

sleep 1

ID="$(xwininfo -name jgmenu | grep -m 1 -o " \+0x[0-9a-f]\+")"
ID="${ID/ /}"

while true; do
   MapState="$(xwininfo -id $ID | grep -o "Is.*" )"
   if [[ "${MapState}" == "IsUnMapped" ]]; then
        break
   fi
   eval $(xdotool getmouselocation --shell)
   xdotool windowmove $ID $((X-5)) $((Y-5)) || break
done

killall jgmenu
exit 0

Last edited by misko_2083 (2020-02-23 07:59:23)


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

#288 2020-02-23 10:50:44

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

Re: jgmenu

@misko - very creative!

Could we use it to take a scrot + blur it and show that being jgmenu?

Offline

#289 2020-02-23 16:32:40

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

Re: jgmenu

malm wrote:

Could we use it to take a scrot + blur it and show that being jgmenu?

Not sure I understand.
Scrot of the full screen than cut out the square defined with X+Y Width x Height and blur it?


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

#290 2020-02-27 09:59:26

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

Re: jgmenu

@Malm Did you mean to take the screenshots of jgmenu while the backgound is changing?
Scrot takes a screenshot of a rectangle of the window in focus with the -u option.
In this case that is yad window. Scrot doesn't know jgmenu is on top but takes the screenshot of what is on the top layer in the rectangle.
What would all those images be used for?
Maybe an animated gif? https://tjhsst.edu/~dhyatt/supercomp/n401a.html

#!/bin/bash
# cd to where the images will be saved
cd ~/Pictures
jgmenu_run config -s ~/.config/jgmenu/jgmenurc -k position_mode -v pointer

unset x
unset y
unset w
unset h
yad --class tab-slideshow --text="\n\n\n\t\t\tLoading" --no-buttons --undecorated --skip-taskbar & TAB_PID=$!
jgmenu_run & disown $!
# Wait untill the tab is created, that is until window name appears
until xdotool getwindowname $(xdotool search --onlyvisible --any --pid $TAB_PID --class "tab-slideshow" 2>/dev/null | tail -1) >/dev/null 2>&1; do
        # sleep until the window opens
        sleep .1
done

# Decimal window id
WindowID="$(xdotool search --onlyvisible --class "tab-slideshow" 2>/dev/null | tail -1)"

# Hexadecimal, that's what xloadimage accepts
WindowIDHex=$(printf "0x%08x" ${WindowID})

ID="$(xwininfo -name jgmenu | grep -m 1 -o " \+0x[0-9a-f]\+")"
ID="${ID/ /}"

eval $(xwininfo -id $ID |
            sed -n -e "s/^ \+Absolute upper-left X: \+\([0-9]\+\).*/x=\1/p" \
                   -e "s/^ \+Absolute upper-left Y: \+\([0-9]\+\).*/y=\1/p" \
                   -e "s/^ \+Width: \+\([0-9]\+\).*/w=\1/p" \
                   -e "s/^ \+Height: \+\([0-9]\+\).*/h=\1/p" )

xdotool windowmove  $WindowIDHex $x $y
xdotool windowsize  $WindowIDHex $w $h
while true; do
        # Where the images are picked from
        for NAME in /usr/share/backgrounds/xfce/*.jpg; do
            MapState="$(xwininfo -id $ID | grep -o "Is.*" )"

            if [[ "${MapState}" == "IsUnMapped" ]]; then
               kill -9 $TAB_PID
               exit
            fi

           xloadimage -windowid $WindowIDHex "$NAME" -quiet 2>/dev/null
           #Set duration here
           sleep .5
           #  take the screenshot of a rectangle of the window in focus
           # yad in this case, but jgmenu in on top layer
           scrot -u
       done     
done & XLOAD_IMAGE=$!

wait $TAB_PID 2>/dev/null

killall jgmenu
exit 0

+Don't forget to change the opacity of the jgmenu in jgmenurc


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

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

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

#292 2020-02-27 21:24:44

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

Re: jgmenu

malm wrote:

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.

Oh well, there is already Xlib and cairo.

#include <cairo.h>
#include <cairo-xlib.h>
#include <X11/Xlib.h>
/* Makes a screenshot 
 *  gcc -o screenshot -fPIC screenshot.c `pkg-config --libs --cflags cairo x11` 
*/
int main(int argc, char** argv) {
    Display *disp;
    Window root;
    cairo_surface_t *surface;
    int scr;

    disp = XOpenDisplay(NULL);
    scr =  DefaultScreen(disp);
    root = DefaultRootWindow(disp);

    surface = cairo_xlib_surface_create(disp, root, DefaultVisual(disp, scr),
              DisplayWidth(disp, scr), DisplayHeight(disp, scr));
    cairo_surface_write_to_png(
              surface,
              "screen.png");
    cairo_surface_destroy(surface);

    return 0;
}

Perhaps it would be faster if only the surface behing the jgmenu is grabbed.
Is it possible to blur a cairo image surface?

-----EDIT
https://discourse.gnome.org/t/cairo-gau … adows/2174
^ That points to stack blur algorithm=> https://gitlab.gnome.org/GNOME/lasem/bl … ace.c#L150
This one is old: http://stevehanov.ca/blog/index.php?id=53

Last edited by misko_2083 (2020-02-27 21:46:32)


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

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

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

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

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

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

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

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

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

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

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,123
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), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

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

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

Re: jgmenu

^ very clever @johnraff.

Offline

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

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

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

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

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,241

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

Online

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

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

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

Board footer

Powered by FluxBB