sx-desktops
sx-desktops is a plugin that enables multiple desktops in samurai-x.
Configuration
-
desktops.desktops
A list of tuples of (desktop name, desktop info dictionary).
sx-desktops itself doesn’t define any desktop information
keys, but e.g. sx-layoutmgr does.
An example:
'desktops.desktops': [
('desktop number one', {'layout': 'floating'}),
('oh, just another desktop', {'layout': 'vert'})
]
-
desktops.autofocus
If desktops.autofocus is True, a new client is automatically
focused.
Default value: True
Actions
-
desktops.cycle([offset=1])
Cycle desktops by offset. Positive values mean
forward cycling, negative values mean backwards cycling.
- Required parameters:
-
-
desktops.cycle_clients([offset=1])
Cycle the clients of the current desktop by offset.
- Required parameters:
-
-
desktops.goto(index)
go to the desktop with the index index.
- Required parameters:
-
-
class sxdesktops.ClientData(desktop, client)
-
class sxdesktops.Desktop(plugin, screen, name, idx, config)
-
active
-
add_client(client)
-
calculate_work_area()
-
handle_net_wm_desktop(evt)
- handle the _NET_WM_DESKTOP client message. Somebody
is requesting to change the desktop of the client.
-
move_client_to_desktop(client, desktop)
-
on_before_focus(client)
- s-x attempts to focus a client.
If the client is not member of the currently active desktop,
activate its desktop.
-
on_focus(client)
- a client was focused: move it to top of the focus stack
-
rearrange()
-
remove_client(client)
-
class sxdesktops.FocusStack(conn, *args)
focus stack implementation based on a list
the last item in the list is the focused item
-
append(client)
-
contains_manager(window)
- returns True if the focus stack contains any
client managing the window window.
-
current()
-
move_to_top(client)
-
next()
-
prev()
-
update_x_stack()
-
x_sort()
-
class sxdesktops.SXDesktops(app)
-
action_cycle(info)
cycle desktop
- parameters:
- offset: int
- optional, defaults to 1
-
action_cycle_clients(info)
-
action_goto(info)
go to a specified desktop
- parameters:
- index: int
- index, starting at 0 (required)
-
action_move_client(info)
move a client to a specific desktop
- parameters:
- index: int
- desktop index, starting at 0 (required)
-
create_desktops(screen)
-
on_load_config(config)
-
on_new_screen(screen)
-
class sxdesktops.ScreenData(screen, desktops)
-
add_client(client)
- add a client. if the window as a _NET_WM_DESKTOP example,
respect it, otherwise place it on the active desktop.
-
cycle_clients(offset=1)
-
cycle_desktops(offset=1)
-
install_handlers()
-
move_client_to_desktop(client, new_desktop)
-
msg_current_desktop(evt)
- handler for the _NET_CURRENT_DESKTOP client message
-
on_after_new_client(screen, client)
-
on_change_desktop(fles, prev)
-
on_unmanage_client(screen, client)
-
set_active_desktop(desktop)
-
set_active_desktop_idx(idx)
-
update_clients(previous_desktop)
- ban and unban clients
-
update_hints()
- Update _NET_CURRENT_DESKTOP.
-
update_workarea()
-
sxdesktops.cycle_indices(current, offset, length)
- Return the index current, cycled
by offset indices.