[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to change status line %W output format
From: |
Amadeusz Sławiński |
Subject: |
Re: How to change status line %W output format |
Date: |
Fri, 26 Jul 2019 08:15:25 +0200 |
On Thu, 25 Jul 2019 11:25:20 +0000
"Liu, Yuanzhe" <address@hidden> wrote:
> Hi,
> The default %w will get something like "0 zsh 1 zsh ....", but I want
> to make it to "[0][zsh][1][zsh]....", which will take less place and much
> more clear for me to find the window I need.
> Is this possible for version 4.03.01?
>
> Regards,
> Yuanzhe
>
Hi,
if you want instand feedback, it's currently impossible without editing source
code.
You could replace AddWindows here with your own version:
https://git.savannah.gnu.org/cgit/screen.git/tree/src/screen.c?h=screen-v4#n2708
AddWindows definition:
https://git.savannah.gnu.org/cgit/screen.git/tree/src/process.c?h=screen-v4#n5512
Another alternative I guess is to use callbacks to print window list, but I
don't have such script at hand.
You could use
screen -Q windows
and then format it into your desired format, while callback would feed it into
screen.
Problem with it would be that, you wouldn't get instand feedback onto your
window situation.
Amadeusz