A spacemacs menu inspired gtk module
Project description
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
}
More options will be added
Methods
draw() -> draw the window
Options
- 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
TODO
License
GPL-3.0-or-later
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spacemenu-0.2.tar.gz
(5.0 kB
view hashes)
Built Distribution
spacemenu-0.2-py3-none-any.whl
(18.8 kB
view hashes)