Closed chapmanjacobd closed 5 years ago
preferably everything to the right of the last equal sign unless there are more than one equal signs
Yeah sounds cool, I'm going to implement that.
maybe this would actually be better implemented within rofi
@svenstaro I think a simple thing to do would be to just allow -run-command
to be specified like rofi run provides, perhaps with different format options (e.g. {equation}
, {result}
).
Currently, the behaviour when selecting a history entry is to printf
the equation and result (i.e. -run-command "echo {equation} = {result}"
). Selecting the current equation with Enter results in "Add to history" being run, so I think it would also be necessary to bind "Ctrl+Enter" or similar to the same sort of behaviour as selecting a history entry.
I didn't really finish that thought - this would allow -run-command "echo {result} | xclip"
or similar and would provide the most flexibility
Would you like to take a stab at implementing that? I'm not quite sure how to do that right now.
@svenstaro Sure, I'll give it a try!
I would like to have rofi-calc to copy the current result to the clipboard and close rofi when ctrl+c is pressed
How could this be implemented? thanks Sven!