gillescastel / inkscape-shortcut-manager

Inkscape shorcut manager
MIT License
360 stars 98 forks source link

Rofi error when trying to save object or style: None.rasi theme not found #22

Closed dalbandea closed 3 years ago

dalbandea commented 3 years ago

Hi,

Thank you for your amazing project. I'm trying to save an object using the shortcut Shift+a, but when I select the object I want to save and press the shortcut, this message pops up:

The following errors were encountered when starting rofi:

Failed to open theme: /home/path/where/I'm/working/None.rasi

Error: **No such file or directory**

Edit: I just figured out that if I copy my .config/rofi/config.rasi file into the folder I'm working in and rename it to None.rasi it works, but it's a bit annoying if I have to do the same every time. Do you think I did something wrong? Or if there is some line I can tweak to work it around?

gillescastel commented 3 years ago

Hi,

This is a bug. The default config sets 'rofi_theme' to None,

config = {
    # For example '~/.config/rofi/ribbon.rasi' or None
    'rofi_theme': None,
    # Font that's used to add text in inkscape
    'font': 'monospace',
    'font_size': 10,
    'open_editor': open_editor,
    'latex_document': latex_document,
}

but then later, instead of checking if rofi_theme is None, the script checks if rofi_theme exists. So the script thinks you've specified a rofi theme with name None.

You can fix this by specifying a path to a rofi theme in your ~/.config/inkscape-shortcut-manager/config.py:

config = {
    'rofi_theme': '~/.config/rofi/ribbon.rasi'
}

I will also fix the bug, but this should fix things right know. Let me know if it works!

dalbandea commented 3 years ago

It works. Thank you a lot!