0

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.

  • why don't you right away use the calculator application? gnome-calculator or just calculator in the dash. you could even stick it to the starter and use the superkey plus its corresponding number. – Phillip -Zyan K Lee- Stockmann Nov 22 '16 at 15:13
  • @Phillip-ZyanKLee-Stockmann cuz that is still more keystrokes / mouse uses than opening Chrome and typing it into the URL bar. I just think its stupid to use a web service, plus an application as heafty as a web browser, to perform a calculation that my OS can easily do. – Todd Nov 22 '16 at 16:27
0

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.

  • Thanks for the tip, but this still requires navigating to the application from dash, pressing "Return" to open it, then performing your procedure. As you can see in my OP, I do know I can open the app and copy it from there. I want to copy the result that is displayed in the dash itself, without having to open the app. Perhaps I dont even need to use calculator - I just want to ask my OS: "hey, whats 37/60?" and just have the result copied to my clipboard, or perhaps at least giving me selectable text I can copy myself. So far, every solution I know of requires opening an additional app. – Todd Nov 22 '16 at 16:32
  • My tests indicate that it does not. " if I type calc: 37/60" as in your original question, gnome-calculator should open automatically and show the result. did you try my answer exactly as written? You don't have to use a macro, it's just a second option. – Elder Geek Nov 22 '16 at 16:39
  • Please re read my comment about not wanting to open an additional application. I am aware I can open the actual calculator app and copy from there. I want to copy from the dash. The dash is displaying the answer for me, I should be able to get that answer without having to open an additional app. I am willing to accept "it is impossible to select text from the dash" as an answer, if that is the case :). – Todd Nov 22 '16 at 16:42
  • You have my apologies if this isn't the answer you wanted. It is however accurate and may help others with the same issue. The point is, you don't have to open calculator. It opens automatically. 2 key combos later you have your output in the clipboard. I highly recommend that you read askubuntu.com/help/how-to-ask Most especially the part about keeping an open mind. – Elder Geek Nov 22 '16 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.