This command generates a 3-item horizontal menu, with "menuprint" sending the left-click choice to stdout:
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13"
If I left-click on each item in turn, I get
xterm
xeyes
xfontsel
In the following command, stdout is piped to sed:
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13" | sed 's/xeyes/aaaaa/'
Clicking on each item in turn gives
xterm
aaaaa
xfontsel
But not all downstream processes accept stdout the way sed does in the example. Neither
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13" | xclip
nor
echo -e "xterm\nxeyes\nxfontsel" | dzen2 -x 450 -y 450 -w 250 -l 3 -m h -sa c -p -e "button1=menuprint;button3=exit:13" | xsel
sends the menu choice to the X clipboard.
Any suggestions about what's going on here? Many thanks in advance.
This command generates a 3-item horizontal menu, with "menuprint" sending the left-click choice to stdout:
If I left-click on each item in turn, I get
xterm
xeyes
xfontsel
In the following command, stdout is piped to sed:
Clicking on each item in turn gives
xterm
aaaaa
xfontsel
But not all downstream processes accept stdout the way sed does in the example. Neither
nor
sends the menu choice to the X clipboard.
Any suggestions about what's going on here? Many thanks in advance.