xbg

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 11 Imported by: 0

README

xbg

Utility and Go module for setting the background image for WMs like i3 and AwesomeWM, using X11.

This is a work in progress! There are some issues left.

The grumpybg utilility is for testing. It currently fails.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPrefix

func CommonPrefix(sl []string) string

CommonPrefix will find the longest common prefix in a slice of strings

func CommonSuffix

func CommonSuffix(sl []string) string

CommonSuffix will find the longest common suffix in a slice of strings

func Meat

func Meat(s, prefix, suffix string) string

Meat returns the meat of the string: the part that is after the prefix and before the suffix. It does not check if the prefix and suffix exists in the string. If the given string is too short to contain the prefix and suffix, it will be returned as it is.

func Quit

func Quit(err error)

Quit with a nicely formatted error message to stderr

Types

type X11

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

X11 or Xorg windowmanager detector

func (*X11) ExecutablesExists

func (x *X11) ExecutablesExists() bool

ExecutablesExists checks if executables associated with this backend exists in the PATH

func (*X11) Name

func (x *X11) Name() string

Name returns the name of this window manager or desktop environment

func (*X11) Running

func (x *X11) Running() bool

Running examines environment variables to try to figure out if either i3 or an X session is running (DISPLAY will then be set)

func (*X11) SetMode

func (x *X11) SetMode(mode string)

SetMode will set the current way to display the wallpaper (stretched, tiled etc)

func (*X11) SetVerbose

func (x *X11) SetVerbose(verbose bool)

SetVerbose can be used for setting the verbose field to true or false. This will cause this backend to output information about what is is doing on stdout.

func (*X11) SetWallpaper

func (x *X11) SetWallpaper(imageFilename string) error

SetWallpaper sets the desktop wallpaper, given an image filename. The image must exist and be readable.

Directories

Path Synopsis
cmd
grumpybg command

Jump to

Keyboard shortcuts

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