You are not logged in.

#101 2017-04-07 20:26:00

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

Re: jgmenu

Wow. That's very clever, bordering on mind boggling.
I'm not near a machine, but will have a play tomorrow.

Offline

#102 2017-04-08 22:35:13

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

Re: jgmenu

^

Here is an alternative version. It avoids the python code and gtk dependency.
It also keeps all the code in one file.

#!/bin/bash

# In case jgmenu is already running in stay-alive mode
killall jgmenu >/dev/null

printf "%b" \
'Copy,cat /tmp/misko | xclip -selection clipboard,gtk-copy\n
Google Search,q=$(cat /tmp/misko | tr " " "+"); firefox https://www.google.co.uk/#q=$q,google\n' \
      | jgmenu --at-pointer --stay-awake --hide-on-startup &

yad --list --column="#":text --column="Nick":text --width=500 --height=600 \
      --dclick-action='bash -c "echo $1 >/tmp/misko; jgmenu_run"' "1" "Misko" "2" "Damo" "3" "Malm" "4" "Head Without a Stick"

test -e /tmp/misko && rm -f /tmp/misko
killall jgmenu >/dev/null

Do you mean "paste" and "new row" functionality for jgmenu or yad?

I found a bug in jgmenu whilst playing with this. I've just pushed a fix, so it'd advise pulling and re-compiling.

Last edited by malm (2017-04-08 22:38:07)

Offline

#103 2017-04-11 05:20:14

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: jgmenu

i don't know what your script is doing, but i noticed that you can eliminate a few pipes (each one opens a subshell) by using bash builtin string manipulation.

exampkle:

misko_2083 wrote:
#!/bin/bash
echo "$DATA" | sed "s/\&/\&/g"
etc.

better:

echo "${DATA//&/&}"

Offline

#104 2017-05-02 20:56:49

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

Re: jgmenu

@Misko, sorry I had missed these last couple of posts.

Your named pipe is neater than my simple tmp file smile

Although I think it would be easier to run jgmenu in short-lived mode for these yad scripts (recently added --simple for this).

Sorry to mess around with the defaults. I want to make it as easy as possible for those using jgmenu as a long-running start menu. Still early days smile

I'll have a play with yad. I'm sure between us we'll get there.

Offline

#105 2017-05-08 17:31:54

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

Re: jgmenu

@misko
I've had a play with the code you posted on 10 April.
I think it works very well smile It's a nice solution.
Regarding the "xclip problem", if you put

echo "" > $PIPE_03

after the xclip line too if works fine (unless I'm missing the point of what you expect it to do).

Offline

#106 2017-05-08 17:37:20

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

Re: jgmenu

^ regarding the IFS, yes we use fgets() and then change '\n' to '\0', so it's very much '\n'.
I think I'd prefer to keep it as it is, but am of course happy to re-consider if it is going to help solve a problem.

Offline

#107 2017-05-13 14:59:44

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

Re: jgmenu

It worked consistently when I played with it.

Are you using --simple?

Does the xclip selection contain '\n' when you get the inconsistent behaviour?

If you're happy, I can commit this script to the jgmenu repo so that we make sure we talk about the same version.

Offline

#108 2017-05-13 15:19:38

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

Re: jgmenu

I'm thinking of writing a jgmenuconf tool using shell + yad. It will probably be small and just cover some options that tint2conf doesn't.
Python+gtk/qt might be a more conventional choice, but I rather like yad smile

Offline

#109 2017-05-21 00:53:12

tynman
Member
Registered: 2015-10-13
Posts: 93

Re: jgmenu

Malm,

I have been building a new system this weekend. When it came time to install jgmenu (which is now part of my "standard setup" (I love it smile )), I noticed one change in the Installation instructions on https://github.com/johanmalm/jgmenu since I did this the last time - you have added a handy new script, "install-debian-dependencies.sh".

Which is very nice enhancement, although I didn't notice it until after I had typed in all those "apt install" commands for the various lib*-dev packages. Anyway, I thought in the instructions,

./scripts/install-debian-dependencies.sh
mkdir ~/src && cd ~/src
git clone https://github.com/johanmalm/jgmenu.git
cd jgmenu
make
make install

the order is wrong, because the "install-debian-dependencies.sh" script won't exist until after you run the "git clone" command. I think the step to run the "install-debian-dependencies.sh" script needs to go between "cd jgmenu" and "make", as in:

mkdir ~/src && cd ~/src
git clone https://github.com/johanmalm/jgmenu.git
cd jgmenu
./scripts/install-debian-dependencies.sh
make
make install

Ben

Offline

#110 2017-05-21 06:42:58

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

Re: jgmenu

Thanks. Good spot! I've changed it.

I'm delighted that you use+like it.
Depending on how old your jgmenurc is, you may do well to delete/update it smile to allow tint2 integration to take place (assuming you use tint2).
Do shout if there are any config mismatches between jgmenu+tint2. jgmenu should pick up on all the tint2 colour scheme and positioning automatically.

If you modify your tint2rc, you'll need to do a `killall jgmenu` to re-load the config (for the time being anyway).

In terms of "interfaces", beware that icon-caching has now been implemented in C and happens automatically, so there is no need to do `jgmenu_run cache` anymore.

I've got a few things to sort out before v0.5.2 (see the TODO2 file).

Offline

#111 2017-05-21 06:47:46

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

Re: jgmenu

P.S.
  - We also honour bl-tint2zen, so it should work even if you don't use a plain tint2rc.
  - The recent addition of `jgmenu_run lx` is still a bit experimental. It's an alternative to pmenu and is just a front-end to libmenu-cache (LXDE's lib for parsing XDG menus). I've noticed a few peculiarities with it and will try to iron them out.

Offline

#112 2017-06-15 18:34:58

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: jgmenu

I'm not sure if it is - easily? - possible, but I'd like to suggest a menu configuration feature to consider: (Vertical) Mirroring.

The categories are on the left side and sub-menus open on the right side. In certain configurations (e.g. when the start button is in the upper right corner) the other way around would work more convenient.

Offline

#113 2017-06-15 22:45:18

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

Re: jgmenu

Good to hear from you.
I'll have a go. Shouldn't be too hard. It'll have to be tomorrow/weekend though.

Offline

#114 2017-06-16 20:51:16

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

Re: jgmenu

@martix: Like this?

WMTxb6Qt.png

The above example has the following jgmenurc:

tint2rules   = 0
item_halign  = right
arrow_string = <
menu_halign  = right

commit 9a5e6c9b

Offline

#115 2017-06-16 21:39:33

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: jgmenu

^Awesome, thank you! That's exactly what I meant.

Very nice desktop btw.

Offline

#116 2017-07-22 19:22:50

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

Re: jgmenu

jgmenu v0.6 has been released

Screenshot below based on examples/ex11.sh

yq9cK5It.png

It is as vanilla as it gets. There is no jgmenurc. The tint2rc is the one created automatically by tint2 with only the following mods:

panel_items = PLTSC

button = new
button_icon = your_favourite_icon
button_max_icon_size = 22
button_lclick_command= jgmenu_run

Offline

#117 2017-07-22 19:35:09

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

Re: jgmenu

Screenshot below based on examples/ex13.sh showing a search box at the top of the menu.

Lgw0h9Nt.png

It's a flavour widgets.c - which is at less than 1% complete/mature and API is likely to change. Yet, I thought some of you might find it slightly more interesting than the scrot in the previous post.

Last edited by malm (2017-07-22 19:36:01)

Offline

#118 2017-08-13 19:01:58

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: jgmenu

a small problem with jgmenu...

I have sublime text installed but it does not show in the menu.
As per usual practice re: sublime the app is installed to /opt and symlinked to /usr/bin

sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime

Any ideas how to get this app to show in jgmenu would be appreciated.

Offline

#119 2017-08-13 20:07:08

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: jgmenu

^
Fixed by adding a 'prepend' to ~/.config/jgmenu
Lesson#8 wink
https://github.com/johanmalm/jgmenu/blo … orial.7.md

Firefox,firefox,firefox
Thunar,thunar,system-file-manager
Termite,termite,utilities-terminal
Sublime,sublime,sublime-text-editor
^sep()

I added a couple more for good measure  wink

2017-08-13-215356_1920x1080_scrot.th.png

Offline

#120 2017-08-13 20:31:25

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

Re: jgmenu

Nice. I was in the middle of trying to install void linux  in virtualbox. It beat me though :-(
Couldn't get grub2 to play. I'll try it on a real drive tomorrow.
jgmenu has made into the official repo on void, so thought I should give it ago.

Offline

Board footer

Powered by FluxBB