Skip to content

Commit 554ef11

Browse files
committed
feat(vz): set descriptive window title for VZ VMs using the graphical display
Let's label the VZ GUI windows so it's easy to tell which window each VM is using. StartGraphicApplication accepts a vz.WithWindowTitle option via the Code-Hex/vz library. This passes a title of the form "Lima: <name> (<arch>)" so users can identify which VM owns a given window at a glance — useful when running multiple VMs simultaneously. Signed-off-by: Blake Garner <blake@netjibbing.com>
1 parent 3569ecb commit 554ef11

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/driver/vz/vz_driver_darwin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,8 @@ func (l *LimaVzDriver) canRunGUI() bool {
468468

469469
func (l *LimaVzDriver) RunGUI(_ context.Context) error {
470470
if l.canRunGUI() {
471-
return l.machine.StartGraphicApplication(1920, 1200)
471+
title := fmt.Sprintf("Lima: %s", l.Instance.Name)
472+
return l.machine.StartGraphicApplication(1920, 1200, vz.WithWindowTitle(title))
472473
}
473474
return fmt.Errorf("RunGUI is not supported for the given driver '%s' and display '%s'", "vz", *l.Instance.Config.Video.Display)
474475
}

0 commit comments

Comments
 (0)