sx-simpledeco
sx-simpledeco is a simple plugin that uses nothing but the core X protocol
to draw simple window decoration.
If possible, use the yahiko decoration plugin instead of sx-simpledeco.
It’s plugin key is “decoration”.
Configuration
-
decoration.bindings
A dictionary mapping Buttonstrokes to to action lines.
The actions are emitted if the user clicks on the title bar.
Provided information:
- screen, the current Screen instance
- x and
- y, the coordinates of the button click event.
- client, the client the frame belongs to.
Default: no bindings.
-
class sxsimpledeco.ClientData(plugin, screen, client)
-
actor_on_configure_notify(evt)
- if the actor is configured, configure the window, too
-
on_button_press(evt)
-
on_expose(evt)
-
on_focus(client)
-
on_map_notify(evt)
-
on_property_notify(evt)
- if a window changes a watched atom, redraw
the title bar.
-
on_unmap_notify(evt)
-
redraw()
-
remove()
- the end.
-
screen_on_configure_notify(evt)
-
window_on_configure_notify(evt)
- if the window is configured, configure the actor, too
-
class sxsimpledeco.SXDeco(app)
-
create_client_data(screen, client)
-
emit_action(client, evt)
-
on_load_config(config)
-
on_new_client(screen, client)
-
on_ready(app)
-
on_unmanage_client(screen, client)
-
sxsimpledeco.compute_actor_geom(geom)
- convert the ‘window geom’ to the ‘geom geom’
-
sxsimpledeco.compute_window_geom(geom)
- convert the ‘frame geom’ to the ‘window geom’
-
sxsimpledeco.parse_buttonstroke(s)
Return (modifiers, button id), extracted from the string s.
It has to contain several modifiers and a button index,
joined together with a ‘+’:
CTRL+1
MOD4+2
1 is the left mouse button,
2 the middle,
3 the right button.