Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior of dzen2 menu stdout #49

Open
Mesibov opened this issue Feb 26, 2019 · 1 comment
Open

Strange behavior of dzen2 menu stdout #49

Mesibov opened this issue Feb 26, 2019 · 1 comment

Comments

@Mesibov
Copy link

Mesibov commented Feb 26, 2019

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.

@Mesibov
Copy link
Author

Mesibov commented Feb 27, 2019

I think what's happening is that dzen2 is "claiming" the X buffer while it's running, and blocking use by xclip and xsel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant