Actions

orcsome.actions.close(window=None)

Close window

orcsome.actions.focus_next(window=None)

Focus next client on current desktop.

next/prev are defined by client creation time

orcsome.actions.focus_prev(window=None)

Focus previous client on current desktop.

next/prev are defined by client creation time

orcsome.actions.restart()

Restart orcsome

orcsome.actions.spawn(cmd, switch_to_desktop=None)

Run specified cmd

Parameters:
  • cmd – shell command. Can include pipes, redirection and so on.
  • switch_to_desktop – integer. Desktop number to activate after command start. Starts from zero.
orcsome.actions.spawn_or_raise(cmd, switch_to_desktop=None, bring_to_current=False, on_create=None, **matchers)

Activate window or run command

Activation means to give input focus for existing window matched by provided rules.

switch_to_desktop controls appear of spawned windows and bring_to_current change matched windows behavior.

on_create is a function with the following signature:

def on_spawned_window_create(wm, desktop, window)

Where wm is orcsome instance, desktop and window are active desktop and focused window before spawn_or_raise call.

Parameters:
  • cmd – same as in spawn().
  • switch_to_desktop – same as in spawn().
  • bring_to_current – if True, move matched window to current desktop
  • on_create – on create handler, called after command spawn
  • **matchers – see is_match()

Previous topic

Guide

Next topic

Orcsome instance api

This Page