cleaner way to rename windows
This commit is contained in:
parent
f8cc3527d9
commit
79286bacb8
1 changed files with 5 additions and 5 deletions
10
superscreen
10
superscreen
|
@ -15,15 +15,15 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# main screen (physical host)
|
||||
screen -d -m -S $session -t `hostname -s`
|
||||
|
||||
screen -d -m -S $session
|
||||
screen -S $session -p $window -X exec printf "\033k%s\033\\" `hostname -s`
|
||||
|
||||
# servers' screens : open a ssh connexion from the host to them, then rename it
|
||||
for server in $servers
|
||||
do
|
||||
let window++
|
||||
window=$(( window + 1 ))
|
||||
screen -S $session -X screen ssh $server
|
||||
screen -S $session -p $window -X exec printf "\033k%s\033\\" $server
|
||||
screen -S $session -p $window -X title $server
|
||||
done
|
||||
|
||||
screen -r $session -p 0
|
||||
|
|
Loading…
Reference in a new issue