Rofi Menu wrapper for hierarchical menu creation.
Project description
About
PyRofi wraps Rofi and helps you to build the hierarchical menus with neat navigation. You can also use te Wofi as the "backend".
Installation
Make sure that you have the Rofi or the Wofi installed. Then just python3 -m pip install --update --user pyrofi (requires Python ^3.6).
Example
#!/usr/bin/env python3
from pyrofi import run_menu
def hello_world(_):
print('Hello World!')
def dice():
import random
return ['echo', random.choice('123456')]
run_menu({
'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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrofi-0.3.0.tar.gz.
File metadata
- Download URL: pyrofi-0.3.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.6.8 Linux/4.15.0-118-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7041f57fb833845d82b365f726b20673b3c3b89a09dc11e0cd2470beadf75e0
|
|
| MD5 |
b53231d4471623c739d362a165c14714
|
|
| BLAKE2b-256 |
c9de6434a5d059305de8f46c43721a3c88b16c4a24b85e04017790c00f9d9c15
|
File details
Details for the file pyrofi-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pyrofi-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.6.8 Linux/4.15.0-118-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09a99b1ad86bb56321582358d25777b666391aa7110759a3f63ee28d61a5df99
|
|
| MD5 |
47a05bd3df39a59ac79e14f929d31fac
|
|
| BLAKE2b-256 |
d3fe33d651b1338b73473f49f7bea9698bb0b5c5a52f92af0a5a9a1a9f8a8233
|