gtksettings

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gtksettings reads the user's GTK settings.ini, the file GTK apps on the host take their theme, icons, cursor and font from: gtk-4.0 first, gtk-3.0 for what it leaves unset.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	ThemeName   string
	IconTheme   string
	CursorTheme string
	CursorSize  uint32
	FontName    string
	// XftDPI is gtk-xft-dpi: the text DPI in 1024ths.
	XftDPI int
}

Settings is what a settings.ini sets; a zero field is unset.

func Load

func Load(configDir string) Settings

Load reads configDir/gtk-4.0/settings.ini, then gtk-3.0's for what it leaves unset. A missing or unreadable file sets nothing.

func Parse

func Parse(text string) Settings

Parse reads one settings.ini. Values may be quoted; unknown keys and malformed numbers are skipped.

func (Settings) Or

func (s Settings) Or(other Settings) Settings

Or fills s's unset fields from other.

Jump to

Keyboard shortcuts

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