Closed kankaristo closed 3 years ago
Looks good, thanks! Just a couple of nits.
@cdown, the requested changes as they are could lead to an error (exit ""
, which gives an error), so I've asked for more comments.
@cdown, I've implemented the suggested changes, and added a check so that the launcher exit code is used only if the variable is set.
Looks good, thanks.
This change is related to https://github.com/cdown/clipmenu/issues/57#issuecomment-740123283.
If
clipmenu
"preserves" the exit code from the launcher (exits with the same code as the launcher), the exit codes from Rofi's custom keybindings can be used withclipmenu
.For example, I'm using the following script bound to
Super+v
:With the above script, I have 3 different options when running
clipmenu
:Return
, the selected item is pasted to where my cursor currently is (a bit hackily withxdotool
)Shift+Return
, the selected item is sent to the clipboard ("default"clipmenu
behavior)Shift+Delete
, the selected item is deleted fromclipmenu
, and the script runs itself again (essentially keepsclipmenu
open)In order for this to work, the only change needed in
clipmenu
is to preserve the exit codes from the custom keybindings.