From 73e3f7548b54491a04d9f12d9cafd23b68cd1895 Mon Sep 17 00:00:00 2001 From: Artur Gurgul Date: Fri, 15 Aug 2025 09:56:42 +0200 Subject: [PATCH] Add option to run vms fullscreen --- lib/vm/qemu.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/vm/qemu.rb b/lib/vm/qemu.rb index 905e56a..9e1d9c7 100644 --- a/lib/vm/qemu.rb +++ b/lib/vm/qemu.rb @@ -68,7 +68,8 @@ module Qemu cdrom: nil, detach: true, ram: 2048, - cpus: 1 + cpus: 1, + fullscreen: true } opts = defaults.merge(options) @@ -82,7 +83,12 @@ module Qemu args += ["-drive", "if=pflash,format=raw,unit=0,readonly=on,file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd"] #args += ["-device", "virtio-gpu-device"] - args += ["-display", "cocoa"] + if opts[:fullscreen] + args += ["-display", "cocoa,full-screen=on"] + else + args += ["-display", "cocoa"] + end + args += ["-device", "qemu-xhci,id=xhci"] args += ["-device", "usb-kbd"] args += ["-device", "usb-tablet"]