[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Few feature requests

From: Raymond Page
Subject: Few feature requests
Date: Sun, 31 Jul 2005 22:26:18 -0400

Hi all,

I've noticed a few things that bug me about screen.

With screen there is a problem with keybinds when the following
conditions arise:
xterm is using UTF-8 fonts and the following resources are set (which
I think is the default for xterm):
metaSendsEscape = false
eightBitInput = true

When cycling between windows, extra characters are deposited on the
command line.  I hope that screen can be patched without too much pain
to fix this.

My keybinds that show the error are:
# Change to left/right window in relation to current window (wraps on edges)
# ALT-,.
bindkey "¬" prev
bindkey "(r)" next
bindkey "^[," prev
bindkey "^[." next

Implementing a keybind to shift windows left/right one window (using
the number command) is not possible as the "number" command does not
change the environment variable of $WINDOW to reflect its new numeric
position.  I think that when the number command is issued, it should
modify the shell environment such that $WINDOW in the source and
destination are swapped.  This may not be possible if screen cannot
modify the running environment of a shell.

I'm trying to get keybinds like the following:
bindkey "^[<" exec !!! screen -X number $(($WINDOW-1)) && export
bindkey "^[>" exec !!! screen -X number $(($WINDOW+1)) && export

Ideally the following would be able to work (I don't think the
bindkeys have access to the shell environment :[ ):
bindkey "^[<" exec !!! screen -X number $(($WINDOW-1))
bindkey "^[>" exec !!! screen -X number $(($WINDOW+1))

This is my last thing...and it has to do with a new string escape.  I
want a %-F or %!F to expand to true when a window does *not* have
focus.  This would allow the following types of sequences:
"%?%F%:non-focused window string escapes%?"
"%?%-F%:focused window string escapes%?"

This %-F would be best in a caption, where currently we can specify
cleanly what we want in the non-focused window, but whatever we
specify in the focused window may clobber the unfocused window.

An example (my caption line which introduces a black on black for the
splits to hide cruft):
caption always "%{=b}%?%F%:%45=%n*%f %t%?%?%F%{r}%:%{s
kk}%?%H%?%F%{-}%? %L=%-Lw+++%45L>%?%F%{g}%?%n*%f %t%?%F%{-}%?%+Lw%-17=
%?%F%{y}%?%c %Y-%m-%d%?"

I'd like to be able to simplify it to:
caption always "%{=b}%?%F%:%45=%n*%f %t%?%?%-F%:%{r}%H%{-}
%L=%-Lw%45L>%{g}%n*%f %t%{-}%+Lw%-17= %?%F%{y}%?%c %Y-%m-%d%?"

Which should have the effect of making the window name appear in the
center of a non-focused split and in the focused split something like:
$TIME-DATE 17 chars from right

Raymond Page

reply via email to

[Prev in Thread] Current Thread [Next in Thread]