[patch #1202] Xterm title with format string (MC_XTITLE env var)
- From: Oswald Buddenhagen <savannah-bounces gnu org>
- To: Adam Byrtek <alpha student uci agh edu pl>, Oswald Buddenhagen <ossi kde org>, mc-devel gnome org
- Cc:
- Subject: [patch #1202] Xterm title with format string (MC_XTITLE env var)
- Date: Tue, 12 Jul 2005 10:07:42 +0000
Follow-up Comment #1, patch #1202 (project mc):
another worthwhile power user patch that gets zero attention ... :(
a much simpler variant that is limited to a fixed user host:/path has been
posted by jindrich novy, but i'm no fan of it.
so back to this patch:
a --title command line option would be useful as well, as things like "xterm
-e su -c 'mc --title root'" would be unnecessarily complicated with an env
variable. also note, that env variables are inherited - this would lead to
unexpected results in some more exotic use cases.
i found, that appending to the already existing title (see bug #13750) would
be very helpful:
xterm -T konsole1
xterm -T konsole2
xterm -T root -e su
xterm -T ktown -e ssh ktown
xterm -e mc
xterm -e mc --title mc2
in the interactive shells mc is aliased to 'mc --append-title'. think
"konsole1: ~ - mc". the benefit is obvious, i think.
--title "" would remove the "mc -" part entirely to save some space in the
task bar.
carrying the %-expandos to excess:
%o - old title
%a - current status ("" (=view), "edit").
note that %w/%W would have to be extended to mean the current file in
view/edit mode.
%A - precise current status (%a plus the usual file operations like copy,
move, etc.)
%f/%F - the object %A currently refers to. mabe this is redundand and would
make sense to change %w/%W's behavior when %A is in "detail mode", because
nobody would want both of them in the same title bar (it would not fit into
any task bar anyway).
%{[var]?[text1]:[text2]} - if var (see above) is non-empty, text1, otherwise
text2 (both subject to further expansion).
with these, one could create things like this:
"%{o?%o (mc):mc}: %{a?%a :}%w"
or the normal variant, but optimized for prefix size (for narrow task bar
entries):
"%{o?%o\: :}%w - mc"
or for the pedantic:
"mc%{o? (%o):} - %{A?%A:view} %F"
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=1202>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]