Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I use the Escape key to hide or exit bashrun?

bashrun escape Hide key
0
Posted

Can I use the Escape key to hide or exit bashrun?

0

The escape key is a meta key in readline and can’t be bound on it’s own, so you can’t do it with a bashrun keybinding. You’ll have to use a method similar to this: • Before running bashrun, dynamically bind the escape key to execute bashrun –hide or bashrun –exit, using your WM or X11 • Run bashrun • Wait for the bashrun window to be unmapped or destroyed • Remove the escape keybinding again Here’s a script that uses xbindkeys and xdotool to implement this method: #!/bin/bash # frontend to bashrun, hides bashrun using the escape key # uses xdotool (http://www.semicomplete.com/projects/xdotool/) # xbindkeys (http://hocwp.free.fr/xbindkeys/xbindkeys.html) XBINDKEYSRC=~/.xbindkeysrc TMPFILE=~/.xbindkeysrc.tmp # note that xbindkeys needs at least one keybinding defined in # .xbindkeysrc to run function update { if ! killall -HUP xbindkeys; then echo “error: can’t HUP xbindkeys, please make sure it’s running.” remove_escape exit 1 fi # man xbindkeys says: “When HUP signal is send to xbind

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123