grub_common

package
v0.0.0-...-c5429dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	GrubParamsFile            = "/etc/default/grub"
	DDEGrubParamsFile         = "/etc/default/grub.d/11_dde.cfg"
	GfxmodeDetectReadyPath    = "/tmp/deepin-gfxmode-detect-ready"
	DeepinGfxmodeDetect       = "DEEPIN_GFXMODE_DETECT"
	DeepinGfxmodeAdjusted     = "DEEPIN_GFXMODE_ADJUSTED"
	DeepinGfxmodeNotSupported = "DEEPIN_GFXMODE_NOT_SUPPORTED"
)

Variables

This section is empty.

Functions

func DecodeShellValue

func DecodeShellValue(in string) string

func GetBootArgDeepinGfxmode

func GetBootArgDeepinGfxmode() (cur Gfxmode, all Gfxmodes, err error)

func HasDeepinGfxmodeMod

func HasDeepinGfxmodeMod() bool

func InGfxmodeDetectionMode

func InGfxmodeDetectionMode(params map[string]string) bool

func IsGfxmodeDetectFailed

func IsGfxmodeDetectFailed(params map[string]string) bool

func LoadDDEGrubParams

func LoadDDEGrubParams() (map[string]string, error)

func LoadGrubParams

func LoadGrubParams() (map[string]string, error)

func LoadGrubParamsFile

func LoadGrubParamsFile(file string) (map[string]string, error)

func ShouldFinishGfxmodeDetect

func ShouldFinishGfxmodeDetect(params map[string]string) bool

Types

type Gfxmode

type Gfxmode struct {
	Width  int
	Height int
}

func ParseGfxmode

func ParseGfxmode(str string) (Gfxmode, error)

func (Gfxmode) String

func (v Gfxmode) String() string

type Gfxmodes

type Gfxmodes []Gfxmode

func GetGfxmodesFromXRandr

func GetGfxmodesFromXRandr() (Gfxmodes, error)

func (Gfxmodes) Add

func (v Gfxmodes) Add(m Gfxmode) Gfxmodes

func (Gfxmodes) Intersection

func (v Gfxmodes) Intersection(v1 Gfxmodes) (result Gfxmodes)

func (Gfxmodes) Len

func (v Gfxmodes) Len() int

func (Gfxmodes) Less

func (v Gfxmodes) Less(i, j int) bool

func (Gfxmodes) Max

func (v Gfxmodes) Max() (max Gfxmode)

func (Gfxmodes) SortDesc

func (v Gfxmodes) SortDesc()

func (Gfxmodes) Swap

func (v Gfxmodes) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL