[openbox] problems with tilde characters in commands
Anthony Thyssen
anthony at griffith.edu.au
Mon Apr 6 02:18:32 EDT 2009
I have been adding keyboard macros in openbox with great success, though
this does require a understanding of Xwindow Event handling to get it to
work right.
But find that if I want a '~' in the arguments to a command that is to
be run by Openbox, it expands that character when it should not do so.
For example in my openbox rc.xml I remoaced the Super Function
keybindings with keyboard macros such as....
<keybind key="W-F2">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Keyboard Macro: Web Page</name>
</startupnotify>
<command>xte 'usleep 500000' \
'str http://www.cit.gu.edu.au/~anthony/'</command>
</action>
</keybind>
The "xte" command is part of the "xautomation" package. An alternative
is the "xmacroplay" command from the ("xmacro" package). For my notes on
generating X window events, and the problems involved see...
http://www.cit.gu.edu.au/~anthony/info/X/Event_Handling.txt
With this keybinding, a user pressing Super-F2 (and quickly releasing
it), Openbox will wait 1/2 (for user to release the modifiers) then
output the string "http://www.cit.gu.edu.au/~anthony/" as if the user
actually typed it into whatever application currently has keyboard
input.
THIS IS VERY USEFUL! And lets me insert URL's in ANY input box, even
ones that do not accept normal copy-paste actions!
But openbox actually expands the '~' with "/home/anthony" which
means the above keyboard macro expands to
http://www.cit.gu.edu.au//home/anthony/
And that is NOT what I am wanting it to ouput!
Other window managers, or the "xbindkey" program does NOT do this,
and eventually I tracked it to OpenBox itself.
How can I get Openbox to give a command a '~' in the argument without
openbox erroneously expanding it?
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
That's the thing about people who think they hate computers.
What they really hate is lousy programmers.
- Larry Niven and Jerry Pournelle, "Oath of Fealty"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the openbox
mailing list