env

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrSetXfconfProperty

func CreateOrSetXfconfProperty(channel, property, propType, newValue string) result.Result

CreateOrSetXfconfProperty sets an Xconf property.

func Hostname

func Hostname() string

Hostname gets the value of HOSTNAME environment variable. os.Exit(1) on failure.

func ListXfconfProperties

func ListXfconfProperties(channel string) ([]string, error)

ListXfconfProperties gives the list of all properties from a given channel.

func ReadDconfKey

func ReadDconfKey(key string) (string, error)

ReadDconfKey reads a dconf key. Returns the key value

func ReadGsettingsKey

func ReadGsettingsKey(schema, key string) (string, error)

ReadGsettingsKey reads a gsettings property. Returns the key value, or an error if the key was not found.

func ReadXdgDir

func ReadXdgDir(key string) (string, error)

ReadXdgDir Reads a XDG folder key

func ReadXfconfProperty

func ReadXfconfProperty(channel, property string) (string, error)

ReadXfconfProperty reads an Xfconf property. Returns the key value, or an error.

func SetXfconfProperty

func SetXfconfProperty(channel, property, newValue string) result.Result

SetXfconfProperty sets an Xconf property.

func UpdateXdgDir

func UpdateXdgDir(key, value string) (bool, error)

UpdateXdgDir Updates the location of an XDG directory It updates the ~/.config/user-dirs.dirs file using XDG executables

func Username

func Username() string

Username gets the login name. os.Exit(1) on failure.

func WriteDconfKey

func WriteDconfKey(key, newValue string) result.Result

WriteDconfKey writes a dconf key.

func WriteDebconfKey

func WriteDebconfKey(packageName, keyName, typeName, value string) result.Result

WriteDebconfKey writes a debconf key

func WriteGsettingsKey

func WriteGsettingsKey(schema, key, newValue string) result.Result

WriteGsettingsKey writes a gsettings key.

Types

type DebConfKey

type DebConfKey struct {
	// contains filtered or unexported fields
}

DebConfKey type

func NullDebConfKey

func NullDebConfKey() DebConfKey

NullDebConfKey gets a null object

func ReadDebconfKey

func ReadDebconfKey(packageName, keyName string) (DebConfKey, error)

ReadDebconfKey retreive a key inside a package If the key is not found, the null key is returned and NO error is reported

func ReadDebconfKeys

func ReadDebconfKeys(packageName string) ([]DebConfKey, error)

ReadDebconfKeys retreive the list of debconf values relative to a package

Jump to

Keyboard shortcuts

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