Package pywingo :: Class Wingo
[frames] | no frames]

Class Wingo

source code

            object --+        
                     |        
commands.WingoCommands --+    
                         |    
                 WingoUtil --+
                             |
                            Wingo

Instance Methods
 
__init__(self, display=None)
Initializes a connection with an instance of Wingo.
source code
 
__del__(self) source code
 
gribble(self, cmd)
Executes a raw Gribble commands and always returns the result as a string.
source code
 
loop(self, restart=True)
Listens for event notifications and executes callbacks when corresponding events are received.
source code
 
bind(self, event_name, f=None)
Binds an event named `event_name` to a callback function `f`.
source code

Inherited from WingoUtil: GetAllNormalClients, GetHiddenWorkspaceList, GetVisibleWorkspaceList, IsEmpty, LoadConfig

Inherited from commands.WingoCommands: AddWorkspace, And, AutoCycle, AutoMakeMaster, AutoMaster, AutoMastersFewer, AutoMastersMore, AutoNext, AutoPrev, AutoResizeMaster, AutoResizeWindow, AutoSwitchNext, AutoSwitchPrev, AutoTile, AutoUntile, Close, CycleClientChoose, CycleClientHide, CycleClientNext, CycleClientPrev, Dale, Deiconify, False, Float, Focus, FocusRaise, FrameBorders, FrameFull, FrameNada, FrameSlim, GetActive, GetAllClients, GetClientHeight, GetClientList, GetClientName, GetClientStatesList, GetClientType, GetClientWidth, GetClientWorkspace, GetClientX, GetClientY, GetHead, GetHeadHeight, GetHeadWidth, GetHeadWorkspace, GetLayout, GetNumHeads, GetNumHeadsConnected, GetWorkspace, GetWorkspaceId, GetWorkspaceList, GetWorkspaceNext, GetWorkspacePrefix, GetWorkspacePrev, HeadCycle, HeadFocus, HeadFocusWithClient, HideClientFromPanels, Iconify, Input, MatchClientClass, MatchClientInstance, MatchClientIsTransient, MatchClientMapped, MatchClientName, MatchClientType, Maximize, Message, MouseMove, MouseResize, Move, MovePointer, MovePointerRelative, MoveRelative, Not, Or, Quit, Raise, RemoveWorkspace, RenameWorkspace, Resize, Restart, Script, ScriptConfig, SelectClient, SelectWorkspace, SetLayout, SetOpacity, Shell, ShowClientInPanels, TagGet, TagSet, ToggleFloating, ToggleIconify, ToggleMaximize, ToggleStackAbove, ToggleStackBelow, ToggleSticky, True, Unfloat, Unmaximize, WingoExec, WingoHelp, Workspace, WorkspaceGreedy, WorkspaceGreedyWithClient, WorkspaceHead, WorkspaceSendClient, WorkspaceToHead, WorkspaceWithClient

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, display=None)
(Constructor)

source code 

Initializes a connection with an instance of Wingo. Once a connection has been established, commands can be executed.

If `display` is not set, then pywingo will try to find the current instance of Wingo and connect to that. This is almost always what you want, unless you know you need to connect to an instance of Wingo from within a different X session (or no X session at all).

If `display` is set, then it *must* be in the following format:

:{X Server}.{X Screen}

e.g., `:0.0` or `:11.1`.

Any other format is invalid.

Overrides: object.__init__

gribble(self, cmd)

source code 

Executes a raw Gribble commands and always returns the result as a string. This should only be used if you know it's necessary. Otherwise, use the API to run specific commands.

loop(self, restart=True)

source code 

Listens for event notifications and executes callbacks when corresponding events are received.

When `restart` is enabled, the event loop will be restarted if there was an error reading from the socket. This is intended to keep the program alive if Wingo restarts. (If Wingo really does die, the reconnection will fail and a regular socket error will be raised.)

bind(self, event_name, f=None)

source code 

Binds an event named `event_name` to a callback function `f`. `f` should be a function that takes a single argument `event`, which will correspond to a namedtuple of the event with any relevant data as properties.

If `f` is None, then a partially applied function is returned. (For decorator support.)