TITLEPROMPT - width x height in prompt?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jun 7, 2008
121
0
#1
Hi

Is it possible the get the number of rows & columns as part of the Windows Title?

I am using TitlePrompt with it set to $P
This is useful because if I have number of TCC sessions open on the taskbar, I can immediately know what I am doing in each windows based on the directory.

But I also have a number of icons to fire of TCC and they have at the base of each description

(80x50)
(80x80)
(150x50)
(150x80)
which is the number of screen (col x row) characters they open up for each TCC session.
It would be nice to somehow prepend that in the TitlePrompt so I am aware of which TCC sessions are screen maximal from the taskbar - but how?

Can this be done?
Any other lateral thinking suggestions most welcome.

Thanks

Stephen Howe
 
#2
Is it possible the get the number of rows & columns as part of the Windows Title?
Code:
set titleprompt=(%%_columns $hx%%_rows) TCC
This will give you, for instance... (80x25) TCC

I guess in adding to your current setting, you would want

Code:
set titleprompt=(%%_columns $hx%%_rows) $P
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,376
39
Albuquerque, NM
prospero.unm.edu
#3
Code:
set titleprompt=(%%_columns $hx%%_rows) TCC
This will give you, for instance... (80x25) TCC

I guess in adding to your current setting, you would want

Code:
set titleprompt=(%%_columns $hx%%_rows) $P
Incidentally, you can also use the square-bracket syntax with internal variables:

Code:
set titleprompt=(%%[_columns]x%%_rows) $P
 
Jun 7, 2008
121
0
#4
Code:
set titleprompt=(%%_columns $hx%%_rows) TCC
This will give you, for instance... (80x25) TCC

I guess in adding to your current setting, you would want

Code:
set titleprompt=(%%_columns $hx%%_rows) $P
Brilliant. Thanks, that works. Just found the notes on internal vars working in TitlePrompt.
That is so much more useful.

Cheers

Stephen Howe
 
#5
Along these lines, what's going on with ESET?

Code:
v:\> eset titleprompt
titleprompt=(%_columns x %_rows) $s[1804]$s$s$p

v:\> set titleprompt
(%_columns x %_rows) $s[1804]$s$s$p

v:\> eset titleprompt
titleprompt=$s[1804]$s$s$p (%_columns x %_rows)

v:\> set titleprompt
$s[1804]$s$s$p (80 x 25)
If I insert the size **before** my customary titleprompt it works as the OP
suggested. If I insert the same thing at the end, it's expanded immediately!

And my (system) titleprompt variable is set to $s[%_pid]$s$s$p. Why don't I see
that when I ESET titleprompt?
 
#6
On Wed, 22 Jun 2011 11:08:45 -0400, Stephen Howe <> wrote:

|Code:
|---------
|set titleprompt=(%%_columns $hx%%_rows) $P
|---------
|---End Quote---
|Brilliant. Thanks, that works. Just found the notes on internal vars working in TitlePrompt.
|That is so much more useful.

But as I pointed out (for ESET) in another post,

Code:
set titleprompt=$P (%%_columns $hx%%_rows)
works quite differently!

Code:
v:\> set titleprompt=$P (%%_columns $hx%%_rows)

v:\> set titleprompt
$P (80 $hx25)

v:\> set titleprompt=(%%_columns $hx%%_rows) $P

v:\> set titleprompt
(%_columns $hx%_rows) $P
 
#7
Code:
v:\> set titleprompt=$P (%%_columns $hx%%_rows)

v:\> set titleprompt
$P (80 $hx25)
Works fine for me.
Code:
[J:\]ver

TCC  12.11.69   Windows XP [Version 5.1.2600]

[J:\]set titleprompt=$P (%%_columns $hx%%_rows)

[J:\]set titleprompt
$P (%_columns $hx%_rows)
Do you have any of the SETDOS things that might be affecting it?
 

rconn

Administrator
Staff member
May 14, 2008
10,097
85
#8
But as I pointed out (for ESET) in another post,

Code:
set titleprompt=$P (%%_columns $hx%%_rows)
works quite differently!

Code:
v:\> set titleprompt=$P (%%_columns $hx%%_rows)
 
v:\> set titleprompt
$P (80 $hx25)
 
v:\> set titleprompt=(%%_columns $hx%%_rows) $P
 
v:\> set titleprompt
(%_columns $hx%_rows) $P
Not reproducible, and AFAIK not possible unless you have something (an alias or plugin?) interfering with the SET.

SET knows and cares nothing about parentheses.
 
#9
Charles Dye wrote:
|...
| Incidentally, you can also use the square-bracket syntax with
| internal variables:
|
|
| Code:
| set titleprompt=(%%[_columns]x%%_rows) $P

... and you can use the backquote (`) to eliminate the doubled % signs:

set titleprompt=`(%[_columns]x%_rows) $P`
--
Steve
 

rconn

Administrator
Staff member
May 14, 2008
10,097
85
#10
Along these lines, what's going on with ESET?

Code:
v:\> eset titleprompt
titleprompt=(%_columns x %_rows) $s[1804]$s$s$p
 
v:\> set titleprompt
(%_columns x %_rows) $s[1804]$s$s$p
 
v:\> eset titleprompt
titleprompt=$s[1804]$s$s$p (%_columns x %_rows)
 
v:\> set titleprompt
$s[1804]$s$s$p (80 x 25)
If I insert the size **before** my customary titleprompt it works as the OP
suggested. If I insert the same thing at the end, it's expanded immediately!
Not reproducible here.

And my (system) titleprompt variable is set to $s[%_pid]$s$s$p. Why don't I see that when I ESET titleprompt?
Not reproducible here.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,376
39
Albuquerque, NM
prospero.unm.edu
#11
Charles Dye wrote:
|...
| Incidentally, you can also use the square-bracket syntax with
| internal variables:
|
|
| Code:
| set titleprompt=(%%[_columns]x%%_rows) $P

... and you can use the backquote (`) to eliminate the doubled % signs:

set titleprompt=`(%[_columns]x%_rows) $P`

... and you can use %@char[215] to get an actual multiplication sign:

Code:
set titleprompt=`(%[_columns]%@char[215]%_rows) $P`
 
#12
On Wed, 22 Jun 2011 11:44:23 -0400, JohnQSmith <> wrote:

|Works fine for me.
|
|Code:
|---------
|[J:\]ver
|
|TCC 12.11.69 Windows XP [Version 5.1.2600]
|
|[J:\]set titleprompt=$P (%%_columns $hx%%_rows)
|
|[J:\]set titleprompt
|$P (%_columns $hx%_rows)

Well, something is amiss here and it only affects titleprompt!

Code:
v:\> set zz
$P (%_columns $hx%_rows)

v:\> set titleprompt=$P (%%_columns $hx%%_rows)

v:\> set titleprompt
$P (80 $hx25)
 
#13
On Wed, 22 Jun 2011 11:45:02 -0400, rconn <> wrote:

|Not reproducible, and AFAIK not possible unless you have something (an alias or plugin?) interfering with the SET.
|
|SET knows and cares nothing about parentheses.

Another dumb move on my part. I had an experimental PRE_INPUT alias that
monkeyed with TITLEPROMPT. All better now.
 
#14
Charles Dye wrote:
| ... and you can use %@char[215] to get an actual multiplication sign:
|
|
| Code:
| set titleprompt=`(%[_columns]%@char[215]%_rows) $P`

Doesn't that depend on the codepage AND font you use, AND on ASCII vs.
Unicode?
--
Steve