You could try this without editing ~/.Xdefaults
, by running:
xterm -xrm 'xterm*allowWindowOps: true'
Then, in new window:
printf "\e[8;%d;%dt" $[LINES+5] $[COLUMNS+5]
.Xdefaults
or .Xresources
Depending on your installation, you may have to store this on .Xresources
instead of .Xdefaults
.
FILES
Xrdb does not load any files on its own, but many desktop environments use xrdb
to load ~/.Xresources
files on session startup to initialize the resource database, as a generalized replacement for ~/.Xdefaults
files.
Then after
sed -e '$axterm*allowWindowOps: true' -i.bak .Xresources
xrdb <.Xresources
Then...
Some bind
samples
You could run this or add to your .bashrc
:
# Some bind for 'Shift' + <direction> key and allowWindowOps resource
bind -x '"\e[1;2C"':'printf "\e[8;%d;%dt" $LINES $((COLUMNS+5))'
bind -x '"\e[1;2D"':'printf "\e[8;%d;%dt" $LINES $((COLUMNS-5))'
bind -x '"\e[1;2B"':'printf "\e[8;%d;%dt" $((LINES+3)) $COLUMNS'
bind -x '"\e[1;2A"':'printf "\e[8;%d;%dt" $((LINES-3)) $COLUMNS'
to be used with respectively: Shift+Right
, Shift+Left
, Shift+Down
or Shift+Up
Note: As this in bash bind, this will work in interactive command environment (aka not under vim
nor less
, read
or any work in progress)
~/.config/openbox/lubuntu-rc.xml
instead of this scripting route?Super+up arrow
or whatever. Other times, your window size will remain the default.