Make title cyan and bold on each page

This commit is contained in:
HikariKnight 2023-11-04 22:01:44 +01:00
parent 82fec3ab58
commit 26dddc43f0
5 changed files with 15 additions and 5 deletions

View file

@ -16,7 +16,8 @@ func Welcome() {
command.Clear() command.Clear()
// Write title // Write title
color.Bold.Println("Welcome to Quickpassthrough!") title := color.New(color.Cyan, color.Bold)
title.Println("Welcome to Quickpassthrough!")
// Write welcome message // Write welcome message
color.Print( color.Print(

View file

@ -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") group := lsiommu.GetIOMMU("-g", mode, "-i", config.Gpu_Group, "-F", "vendor:,prod_name,optional_revision:,device_id")
// Write a title // 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 // Print all the gpus
for _, v := range group { for _, v := range group {

View file

@ -10,6 +10,7 @@ import (
lsiommu "github.com/HikariKnight/quickpassthrough/internal/lsiommu" lsiommu "github.com/HikariKnight/quickpassthrough/internal/lsiommu"
"github.com/HikariKnight/quickpassthrough/pkg/command" "github.com/HikariKnight/quickpassthrough/pkg/command"
"github.com/HikariKnight/quickpassthrough/pkg/menu" "github.com/HikariKnight/quickpassthrough/pkg/menu"
"github.com/gookit/color"
) )
func genVBIOS_dumper(config *configs.Config) { 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] vbios_path := lsiommu.GetIOMMU("-g", "-i", config.Gpu_Group, "--rom")[0]
configs.GenerateVBIOSDumper(vbios_path) 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 // Tell users about the VBIOS dumper script
fmt.Print( fmt.Print(
"For some GPUs, you will need to dump the VBIOS and pass the\n", "For some GPUs, you will need to dump the VBIOS and pass the\n",

View file

@ -7,14 +7,16 @@ import (
"github.com/HikariKnight/quickpassthrough/internal/configs" "github.com/HikariKnight/quickpassthrough/internal/configs"
"github.com/HikariKnight/quickpassthrough/pkg/command" "github.com/HikariKnight/quickpassthrough/pkg/command"
"github.com/HikariKnight/quickpassthrough/pkg/menu" "github.com/HikariKnight/quickpassthrough/pkg/menu"
"github.com/gookit/color"
) )
func disableVideo(config *configs.Config) { func disableVideo(config *configs.Config) {
// Clear the screen // Clear the screen
command.Clear() command.Clear()
// Get our config struct // Write a title
//config := configs.GetConfig() title := color.New(color.Cyan, color.Bold)
title.Println("Do you want to disable video output on the VFIO card in Linux?")
fmt.Print( fmt.Print(
"Disabling video output in Linux for the card you want to use in a VM\n", "Disabling video output in Linux for the card you want to use in a VM\n",

View file

@ -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") group := lsiommu.GetIOMMU("-u", mode, "-i", id, "-F", "vendor:,prod_name,optional_revision:,device_id")
// Write a title // 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 // Print all the usb controllers
for _, v := range group { for _, v := range group {