From 26dddc43f05c990289728950dd84f44c47c62171 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Sat, 4 Nov 2023 22:01:44 +0100 Subject: [PATCH] Make title cyan and bold on each page --- internal/pages/01_welcome.go | 3 ++- internal/pages/02_select_gpu.go | 3 ++- internal/pages/03_vbios_extract.go | 5 +++++ internal/pages/04_disable_video.go | 6 ++++-- internal/pages/05_select_usbctrl.go | 3 ++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/internal/pages/01_welcome.go b/internal/pages/01_welcome.go index 6bcb8d1..e9ab006 100644 --- a/internal/pages/01_welcome.go +++ b/internal/pages/01_welcome.go @@ -16,7 +16,8 @@ func Welcome() { command.Clear() // Write title - color.Bold.Println("Welcome to Quickpassthrough!") + title := color.New(color.Cyan, color.Bold) + title.Println("Welcome to Quickpassthrough!") // Write welcome message color.Print( diff --git a/internal/pages/02_select_gpu.go b/internal/pages/02_select_gpu.go index 99ca090..adfa3d3 100644 --- a/internal/pages/02_select_gpu.go +++ b/internal/pages/02_select_gpu.go @@ -53,7 +53,8 @@ func viewGPU(config *configs.Config, ext ...int) { group := lsiommu.GetIOMMU("-g", mode, "-i", config.Gpu_Group, "-F", "vendor:,prod_name,optional_revision:,device_id") // Write a title - color.Bold.Println("This list should only show devices related to your GPU (usually 1 video, 1 audio device)") + title := color.New(color.Cyan, color.Bold) + title.Println("This list should only show devices related to your GPU (usually 1 video, 1 audio device)") // Print all the gpus for _, v := range group { diff --git a/internal/pages/03_vbios_extract.go b/internal/pages/03_vbios_extract.go index 76c653a..bc48ba9 100644 --- a/internal/pages/03_vbios_extract.go +++ b/internal/pages/03_vbios_extract.go @@ -10,6 +10,7 @@ import ( lsiommu "github.com/HikariKnight/quickpassthrough/internal/lsiommu" "github.com/HikariKnight/quickpassthrough/pkg/command" "github.com/HikariKnight/quickpassthrough/pkg/menu" + "github.com/gookit/color" ) func genVBIOS_dumper(config *configs.Config) { @@ -29,6 +30,10 @@ func genVBIOS_dumper(config *configs.Config) { vbios_path := lsiommu.GetIOMMU("-g", "-i", config.Gpu_Group, "--rom")[0] configs.GenerateVBIOSDumper(vbios_path) + // Write a title + title := color.New(color.Cyan, color.Bold) + title.Println("Generated \"dump VBIOS\" script") + // Tell users about the VBIOS dumper script fmt.Print( "For some GPUs, you will need to dump the VBIOS and pass the\n", diff --git a/internal/pages/04_disable_video.go b/internal/pages/04_disable_video.go index 36aba95..3fdfc94 100644 --- a/internal/pages/04_disable_video.go +++ b/internal/pages/04_disable_video.go @@ -7,14 +7,16 @@ import ( "github.com/HikariKnight/quickpassthrough/internal/configs" "github.com/HikariKnight/quickpassthrough/pkg/command" "github.com/HikariKnight/quickpassthrough/pkg/menu" + "github.com/gookit/color" ) func disableVideo(config *configs.Config) { // Clear the screen command.Clear() - // Get our config struct - //config := configs.GetConfig() + // Write a title + title := color.New(color.Cyan, color.Bold) + title.Println("Do you want to disable video output on the VFIO card in Linux?") fmt.Print( "Disabling video output in Linux for the card you want to use in a VM\n", diff --git a/internal/pages/05_select_usbctrl.go b/internal/pages/05_select_usbctrl.go index bc9a004..425e376 100644 --- a/internal/pages/05_select_usbctrl.go +++ b/internal/pages/05_select_usbctrl.go @@ -53,7 +53,8 @@ func viewUSB(id string, config *configs.Config, ext ...int) { group := lsiommu.GetIOMMU("-u", mode, "-i", id, "-F", "vendor:,prod_name,optional_revision:,device_id") // Write a title - color.Bold.Println("This list should only show the USB controller") + title := color.New(color.Cyan, color.Bold) + title.Println("This list should only show the USB controller") // Print all the usb controllers for _, v := range group {