I am using the Unity Dash calc:
command to do quick calculations, as Id rather do this than open up Chrome and ask Google. However, I cant copy the result, I still have to open up the calculator application and copy it from there. This is somewhat expensive, as it requires first clicking on the icon, waiting for the silly animation to complete, then clicking on the resulting icon again, then clicking on the open app, then selecting the result, then copying. Thus, its still easier to just use a web browser, so I would like this to be just as easy from the dash.
For any way I click on the result, there doesnt seem to be a way to select text and copy. I am not interested in how to do this with any other application, as this is trivial and known. I am only interested in how to do this within the dash itself.
Is there a way I can modify the dash to make text easily selectable? Is there a way I can just have calc:
results copied to my clipboard? For example, if I type calc: 37/60
, I want to just simply hit "ctrl+c" and have 0.616666667
in my clipboard.
FWIW, I am using Ubuntu 16.04 LTS. Also, I am not married to the "dash - calculator" combo - if there is any other way I can pop open the dash, type in some arithmetic, and get an answer I can select and copy, I am happy. Id prefer not to write my own script to handle this, as its such a primitive operation for the OS, the dash should just do this for me.
You can do this directly via the keyboard, It will however require an extra key combination. Using your command
calc: 37/60
from the dash,gnome-calculator
will open automatically and show the result. Upon receiving your result type ShiftHome and then CtrlC The result of your calculation is now in your clipboard. There's no need to use the mouse or manually open calculator whatsoever. Yes you can copy whats in the dash, what you can't do is get results from it.Tested under Ubuntu with Unity 14.04 LTS and 16.04 LTS.
If you wish to complete this task with a single key combination you could record a macro with xmacro which is available in the Universe repository and assign it to an unused key combination (to avoid breaking something else in the process). If any of this is unclear, drop me a comment and I"ll do my best to eliminate any confusion.