lxde / lxpanel

Other
59 stars 42 forks source link

Feaure request: Toggle Menu #32

Open root2185 opened 3 years ago

root2185 commented 3 years ago

lxpanel version 0.10.1-2

Can you make lxpanelctl menu toggle the menu? So you can bind a key that pressed again hide it.

arteze commented 2 weeks ago

I have the same problem, the most I got to is this.

    <keybind key="Super_L">
      <action name="Ejecute" >
          <command>lxpanelctl menu</command>
      </action>
    </keybind>
arteze commented 2 weeks ago

I made this script, very primitive, what it does is restart the lxpanel and creates a temporary file as a signal that the menu was activated, next time, delete that file.

/bin/lxdemenutoggle

#!/bin/sh

temp="/root/statusmenu.txt"
if [ -e "$temp" ]; then
    rm "$temp"
    pkill -kill lxpanel
    nohup lxpanel 1>/dev/null &disown
else
    echo "1" > "$temp"
    lxpanelctl menu
fi

En /root/.config/openbox/rc.xml

    <keybind key="Super_L">
      <action name="Ejecute" >
          <command>lxdemenutoggle</command>
      </action>
    </keybind>
arteze commented 2 weeks ago

I see that with my technique it is not possible either, because when the menu is activated, Openbox no longer receives the Windows key shortcut.