SpaceMenu
Description
SpaceMenu is a python module inspired by the spacemacs "space menu". Designed to be used as a laucher for i3wm
Dependencies
gtk-3.0
Installation
pip install spacemenu
Usage
Window
The class Window represents the menu window itself
from spacemenu import Window
window = Window(root, options)
Parameters
root -> A dictionary with the desired display information in the following schema:
{
"label": 'title of the window',
"branches": [
{
"label": "label for the first branch",
"branches": [],
"leaves": []
}
],
"leaves": [
{ "label": "label for leaf 1", "command": "shell command to be executed""}
]
}
so, a branch can contain other branches or leaves, and each leaf executes a command.
options -> Options can either be a dictonary or an Options object
{
"margin": 10,
"column_spacing": 1,
"row_spacing": 1,
"max_columns": 5,
"row_height": 35,
"margin_left": 0,
"margin_right": 0,
"margin_bottom": 0,
"font": "italic bold 12px Georgia, serif",
"background_color": "#ffffff"
"button_background_color": "#ffffff"
"button_text_color": "#000000"
"branch_background_color": "#ffffff",
"branch_text_color": "#ffffff",
"branch_text_shortcut_color": "#ff0000",
"branch_text_separator_color": "#00ff00",
"branch_text_label_color": "#0000ff",
"leaf_background_color": "#ffffff",
"leaf_text_color": "#000000",
"leaf_text_shortcut_color": "#ff0000",
"leaf_text_separator_color': "#00ff00",
"leaf_text_label_color": "#0000ff"
}
note: any undefined values will be set to the Gtk theme default
Methods
draw() -> draw the window
Options
Outer Shape
- margin_left: Sets outer left margin (in px)
- margin_right: Sets outer right margin (in px)
- margin_bottom: Sets outer bottom margin (in px)
Inner Shap
- inner_margin: Inner margin for the window
- column_spacing: Spacing between each column
- row_spacing: Spacing between each row
- max_columns: Maximum number of columns to display
- row_height: The height of the buttons in each row
- font: Font to be used by the labels
Colors
- background_color: The color for the window background (#rrggbb)
- button_background_color: The color for the button background (#rrggbb)
- button_text_color: The color for the text of the buttons(#rrggbb)
TODO
- allow externally defined shortcuts
License
GPL-3.0-or-later
Metadata
Release files for spacemenu 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spacemenu-0.4.tar.gz | 7.3 kB | Without provenance | Details for spacemenu-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spacemenu-0.4-py3-none-any.whl | Python 3 | none | any | Details for spacemenu-0.4-py3-none-any.whl |
Total release size: 28.0 kB
Security for spacemenu 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.