1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TITLEPROMPT - width x height in prompt?

Discussion in 'Support' started by Stephen Howe, Jun 22, 2011.

  1. Stephen Howe

    Joined:
    Jun 7, 2008
    Messages:
    121
    Likes Received:
    0
    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. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    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
     
  3. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,299
    Likes Received:
    39
    Incidentally, you can also use the square-bracket syntax with internal variables:

    Code:
    set titleprompt=(%%[_columns]x%%_rows) $P
     
  4. Stephen Howe

    Joined:
    Jun 7, 2008
    Messages:
    121
    Likes Received:
    0
    Brilliant. Thanks, that works. Just found the notes on internal vars working in TitlePrompt.
    That is so much more useful.

    Cheers

    Stephen Howe
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,934
    Likes Received:
    30
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,934
    Likes Received:
    30
    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. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    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?
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    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. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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
     
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    Not reproducible here.

    Not reproducible here.
     
  11. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,299
    Likes Received:
    39
     
  12. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,934
    Likes Received:
    30
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,934
    Likes Received:
    30
    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. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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
     
  15. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,299
    Likes Received:
    39
    I think the title bars are inherently Unicode. But I suppose you could set the title bars to some font which doesn't include that character.
     

Share This Page