Skip to main content

Rofi Menu wrapper for hierarchical menu creation.

Project description


PyPI - License PyPI - Implementation PyPI - Python Version GitHub tag (latest SemVer) PyPI wemake-python-styleguide

PyRofi wraps Rofi and helps you to build the hierarchical menus with neat navigation. You can also use te Wofi as the "backend".


Make sure that you have the Rofi or the Wofi installed. Then just python3 -m pip install --update --user pyrofi (requires Python ^3.6).


#!/usr/bin/env python3

from pyrofi import run_menu

def hello_world(_):
    print('Hello World!')

def dice():
    import random
    return ['echo', random.choice('123456')]

    'Calculator': ['xcalc'],
    'Games': {
        'Rogue': ['rogue'],
        'Angband': ['angband']
    'Calendar': ['ncal', '2019'],
    'Hello World': hello_world,
    'Dice': dice,

If you want to use Wofi, you will need to add menu_cmd=pyrofi.WOFI_CMD (or just menu_cmd='wofi) to the run_menu call.

More complex example you can see here and run it with python3 -m pyrofi.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrofi-0.3.0.tar.gz (3.7 kB view hashes)

Uploaded source

Built Distribution

pyrofi-0.3.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page