wm

package
v0.0.0-...-5f9e87e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Overview

package wm is a Wingo specific package that maintains the global state of Wingo.

Index

Constants

This section is empty.

Variables

View Source
var (
	X         *xgbutil.XUtil
	Root      *xwindow.Window
	Startup   bool
	Clients   ClientList
	Heads     *heads.Heads
	Prompts   AllPrompts
	Config    *Configuration
	Theme     *ThemeConfig
	StickyWrk *workspace.Sticky

	ShapeExt bool
	Restart  bool
)
View Source
var (
	MouseClientClicked xproto.Window
)

MouseClientClicked is a terrible hack to inject state into commands. Basically, if a command is given with "::mouse::" as the argument for a client parameter, this variable will be checked and its value will be used.

Functions

func AddClient

func AddClient(c Client)

func AddWorkspace

func AddWorkspace(name string) error

func ClientMouseSetup

func ClientMouseSetup(c Client)

func FYI

func FYI(format string, vals ...interface{})

func FocusFallback

func FocusFallback()

func FrameMouseSetup

func FrameMouseSetup(c Client, frameId xproto.Window)

func FramePieceMouseSetup

func FramePieceMouseSetup(c Client, piece string, pieceid xproto.Window)

func Initialize

func Initialize(x *xgbutil.XUtil,
	cmdEnv *gribble.Environment, hacks CommandHacks)

func PopupError

func PopupError(format string, vals ...interface{})

func RemoveClient

func RemoveClient(c Client)

func RemoveWorkspace

func RemoveWorkspace(wrk *workspace.Workspace) error

func RenameWorkspace

func RenameWorkspace(wrk *workspace.Workspace, newName string) error

func RootGeomChangeFun

func RootGeomChangeFun() xevent.ConfigureNotifyFun

func SetWorkspace

func SetWorkspace(wrk *workspace.Workspace, greedy bool)

func ShowCycleClient

func ShowCycleClient(keyStr string, activeWrk, visible, iconified bool)

func ShowSelectClient

func ShowSelectClient(tabComp int, activeWrk, visible, iconified bool,
	data interface{})

func ShowSelectWorkspace

func ShowSelectWorkspace(tabComp int, data interface{})

func Workspace

func Workspace() *workspace.Workspace

func WorkspaceToHead

func WorkspaceToHead(headIndex int, wrk *workspace.Workspace)

Types

type AllPrompts

type AllPrompts struct {
	Cycle   *prompt.Cycle
	Slct    *prompt.Select
	Input   *prompt.Input
	Message *prompt.Message
	// contains filtered or unexported fields
}

type Client

type Client interface {
	Id() xproto.Window
	Frame() frame.Frame
	IsMapped() bool
	Iconified() bool
	IsSkipPager() bool
	IsSkipTaskbar() bool
	Workspace() workspace.Workspacer
	ImminentDestruction() bool
	IsMaximized() bool
	Remaximize()

	CycleItem() *prompt.CycleItem
	SelectItem() *prompt.SelectItem

	DragMoveBegin(rx, ry, ex, ey int) bool
	DragMoveStep(rx, ry, ex, ey int)
	DragMoveEnd(rx, ry, ex, ey int)

	DragResizeBegin(direction uint32, rx, ry, ex, ey int) (bool, xproto.Cursor)
	DragResizeStep(rx, ry, ex, ey int)
	DragResizeEnd(rx, ry, ex, ey int)
}

func FindManagedClient

func FindManagedClient(id xproto.Window) Client

func LastFocused

func LastFocused() Client

type ClientList

type ClientList []Client

func (ClientList) Get

func (cls ClientList) Get(i int) heads.Client

func (ClientList) Len

func (cls ClientList) Len() int

type CommandHacks

type CommandHacks struct {
	MouseResizeDirection     func(cmdStr string) (string, error)
	CycleClientRunWithKeyStr func(keyStr, cmdStr string) (func(), error)
}

type Configuration

type Configuration struct {
	ConfirmKey, CancelKey string
	BackspaceKey          string
	TabKey, RevTabKey     string

	Ffm                 bool
	FfmFocus            bool
	FfmRaise            bool
	FfmStartupFocus     bool
	FfmHead             bool
	Workspaces          []string
	DefaultLayout       string
	PopupTime           int
	ShowFyi, ShowErrors bool
	Shell               string
	AudioProgram        string
	// contains filtered or unexported fields
}

type ThemeBorders

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

func (ThemeBorders) FrameTheme

func (tb ThemeBorders) FrameTheme() *frame.BordersTheme

type ThemeConfig

type ThemeConfig struct {
	DefaultIcon *xgraphics.Image
	Full        ThemeFull
	Borders     ThemeBorders
	Slim        ThemeSlim
	Prompt      ThemePrompt
}

type ThemeFull

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

func (ThemeFull) FrameTheme

func (tf ThemeFull) FrameTheme() *frame.FullTheme

type ThemePrompt

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

func (ThemePrompt) CycleTheme

func (tp ThemePrompt) CycleTheme() *prompt.CycleTheme

func (ThemePrompt) InputTheme

func (tp ThemePrompt) InputTheme() *prompt.InputTheme

func (ThemePrompt) MessageTheme

func (tp ThemePrompt) MessageTheme() *prompt.MessageTheme

func (ThemePrompt) SelectTheme

func (tp ThemePrompt) SelectTheme() *prompt.SelectTheme

type ThemeSlim

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

func (ThemeSlim) FrameTheme

func (ts ThemeSlim) FrameTheme() *frame.SlimTheme

Jump to

Keyboard shortcuts

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