What started as a < 20 lines script to make a simple power menu to use with Rofi.
Simply download simple_rofi_menu.py
and an example config file to the same directory. You can find examples in the example_configs/
folder.
If you want to use a different path for your config file, add an environment variable 'SRM_CONFIG_DIR
' and set it to the path of the directory containing your srm_config.<extension>
file.
As of now, SRM supports YAML and JSON formats. SRM will look for the YAML one first, then the JSON one. If you intend on using a YAML configuration file, you will need to have PyYAML installed.
To use the menu with rofi, use:
rofi -show <name> -modi <name>:<path>/simple_rofi_menu.py.
Note: This script uses #!/usr/bin/env python3
, it will fetch your current Python environment and look for Python 3. You can do pip3 install PyYAML --user
to install PyYAML in your general Python environment.
numbered
False
index_start
0
numbered
is True
.index_format
"{item_index} {item_name}"
MenuItem
if numbered
is True
, which must define {item_index}
and {item_name}
.separator
"---"
name
command