Skip to content

return code when cancelled should not be 0 #232

@Pierric82

Description

@Pierric82

Hi,

I've adopted rofimoji recently. On my setup (fairly minimalist wayland desktop with hyprland), the direct input action works in some apps (terminal) but not others (vivaldi browser, running as wayland native app). So I've set up a shortcut to use the clipboard output instead, paste and then remove the clipboard element:

rofimoji -a copy && hyprctl dispatch sendshortcut CTRL,v,activewindow && cliphist list | head -n1 | cliphist delete

This works nicely when I do select an emoji. But if I hit escape to cancel, rofimoji returns 0 as error code, so the entire sequence still happens instead of stopping like one would expect, and I end up pasting something else, and deleting something from my clipboard history.

All of this to say: I think it would make sense for rofimoji to return a non-zero code when the menu is exited without a character being selected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions