Skip to main content

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)

Source distribution for spacemenu 0.4
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)

Table of built distributions (wheels) for spacemenu 0.4
File Interpreter ABI Platform Actions
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

Release files / spacemenu-0.4.tar.gz

Download URL spacemenu-0.4.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a5d19f04b7020a924f93bf941791ce2ccec08b8b1d94d9e23e7bc4b37b2d59bf
BLAKE2b-256 checksum
How to use checksums
02b916e2482977fa50f8a2bda30103d49f26a10c1f468e6d3f7f7a479c0a16d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / spacemenu-0.4-py3-none-any.whl

Download URL spacemenu-0.4-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
588acad1f1c96b41ad22208548770bf2134384671894141c9217fb9d160dd1e6
BLAKE2b-256 checksum
How to use checksums
51915b9c853f55cf5a1206de6f6cbdfaf9d174cf7b47b4b34a771d7424fef603
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page