1. How can I remove the window decorations for bashrun in my wm?
2. Can I use the Escape key to hide or exit bashrun?
3. Why doesn't resizing work in my preferred terminal?
4. Meta keybindings (e.g. Alt-w) don't work, what can I do?
5. Can I create my own custom actions and bind them to key sequences?
The X properties for the terminal window are set as follows:
You should be able to use these properties to configure your wm to omit window decorations for windows matching these properties. Examples:
Add the following lines to the <applications> section in your rc.xml:
<application name="bashrun"> <decor>no</decor> <focus>yes</focus> <skip_pager>yes</skip_pager> <layer>above</layer> <desktop>all</desktop> </application>
Add the following entry to your ~/.pekwm/autoproperties file:
Property = "^bashrun,^XTerm" { ApplyOn = "Start New" Border = "False"; Titlebar = "False" Sticky = "True" }
Use "!(title=bashrun)" in CCSM
If your wm doesn't support per application settings out of the box, you can use Devil's Pie to disable decorations by creating
~/.devilspie/bashrun.dscontaining
( if ( and ( matches ( window_name ) "bashrun" ) ) ( begin ( undecorate ) ( skip_pager ) ( skip_tasklist ) ( wintype "utility" ) ) )
thanks to Dieter@be, dmz and Jérôme M. for these suggestions.
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:
bashrun --hide
bashrun
--exit
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 xbindkeys, # changes in $HOME/.xbindkeysrc takes effect only after moving # mouse." ... LOC=`xdotool getmouselocation 2> /dev/null` X=$(echo $LOC | cut -d ' ' -f 1 | cut -d ':' -f 2) Y=$(echo $LOC | cut -d ' ' -f 2 | cut -d ':' -f 2) xdotool mousemove 0 0 2> /dev/null xdotool mousemove $X $Y 2> /dev/null } function add_escape { echo -e "\"bashrun --hide\"\nEscape" >> $XBINDKEYSRC update } function remove_escape { cp $XBINDKEYSRC $TMPFILE && head -n -2 $TMPFILE > $XBINDKEYSRC && rm $TMPFILE update } add_escape bashrun --show & bashrun --wait remove_escape
Use this script as a frontend for launching bashrun.
Only xterm and *rxvt
support the ansi escape
sequence ^[[8;<lines>;<cols>t
XTerm requires the allowWindowOps
resource to be
set to True
to allow window resizing.
Configure your terminal to translate Alt-w into <Escape>-w. This is usually called "MetaSendsEscape" or similar. For Xterm, use
XTerm*metaSendsEscape: True XTerm*altSendsEscape: Truein your
~/.Xdefaults
file. You may need to reload
your X settings with xrdb -merge
~/.Xdefaults
This feature is currently being worked on.