xlucn / xdg-xmenu

Minimal app menu with xmenu
MIT License
35 stars 4 forks source link

Show xdg-xmenu as a submenu integrated in xmenu #11

Closed niels0n closed 1 year ago

niels0n commented 1 year ago

Hey, right now I have my xmenu.sh like this:


#!/bin/sh

xmenu <<EOF | sh &
Terminal    alacritty
Web Browser firefox
File Manager    thunar
Text Editor geany

Applications    xdg-xmenu -I

Exit            /home/andrea/bin/powermenu.sh
EOF

This way to open xdg-xmenu I have to click on Applications.

Is there a way to have xdg-xmenu embedded in xmenu, instead of having to click on Applications?

xlucn commented 1 year ago

This is a feature I have long considered adding to xdg-xmenu, which uses a file as wrapper and insert the menu into it. It's not hard to implement, I am just lazy :)

Actually, I find out it can be temporarily done quite nicely with (it simply add a tab in front of the lines to make them a submenu)

#!/bin/sh

xmenu <<EOF | sh &
Terminal    alacritty
Web Browser firefox
File Manager    thunar
Text Editor geany

Applications
$(xdg-xmenu -dI | sed 's/.*/\t\0/')

Exit            /home/andrea/bin/powermenu.sh
EOF

Remove the -I option have icons. Please try if it works for you.

I guess I can keep being lazy, then?

niels0n commented 1 year ago

I'm happy. Have a good laziness, you deserve it.

niels0n commented 1 year ago

Actually, jokes aside, just another thing. It would be great to have all the categories of xdg-xmenu directly in xmenu, instead of having to put the cursor on Applications > to view them. Would it be possible?

You know, I'm lazy too...

xlucn commented 1 year ago

That should be easier:

#!/bin/sh

xmenu <<EOF | sh &
Terminal    alacritty
Web Browser firefox
File Manager    thunar
Text Editor geany

$(xdg-xmenu -dI)

Exit            /home/andrea/bin/powermenu.sh
EOF
niels0n commented 1 year ago

of course it is, sorry for the dumb question and thank you!