I’m looking for a way to display the active user for each window in a GNU screen session in its the hardstatus line.
Example
I have the following windows open
Window 0 - user1@localmachineWindow 1 - user1@localmachineWindow 2 - user1@localmachine SSH to user2@remotemachine
At the moment the hardstatus is:
0$ something [user1] 1$ something [user1] 2$ something [user2]
Where something [username] is typed in manually.
Is there any way to automatically display the windows current user?
You can use an escape sequence to set the window title, if that’s what you want:
Just add this line to your
.bashrcor similar file.