1

I've currently set up the screenlet calculator but do not want to use it, as

1) Screenlets are no longer in development, most do not work, and I intend to slowly migrate away from them.

2) The existing Screenlet calculator looks very similar to the one in OSX, and IMHO it's not appealing.

I prefer either galculator or gcaltool. Is there anyway to get these in the widget layer? I'm open to other options as well, but basically I'm looking for a 'non-screenlet' calculator to come up in the Compiz Widget Layer.

Thanks.

Software Specs: Ubuntu 12.04 with Xubuntu desktop. Xfce upgraded to 4.10, and using Compiz.

1

Just figured it out. But well worth it as it CAN BE APPLIED TO MAKE ANY PROGRAM WINDOW A WIDGET!!

1) Finding Calculator Window Class:

a) Load the calculator program.

b) Then load a terminal window.

c) To get the class of the calculator window, in terminal run

xprop WM_CLASS | cut -d\" -f4

Your mouse will now look like a cross-hair.

d) Now click on the open calculator program you want to use in the widgets layer. The output class is displayed in terminal.

e) Note it down. In my case its 'galculator'.

2) Setting up Calculator in Compiz Widget Layer: Go to Menu\Settings\Compiz Config Manager\Desktop\Widget Layer\

a) Enable the 'Widget Layer' Plugin.

b) Within the Widget Layer Plugin section, go to Behaviour\Widget Windows\ and enter

(class=Galculator)

If you require multiple widgets, then enter

(class=Galculator) | (class=Screenlet)

| is 'or' and in my case I'm allowing both Galculator + Screenlets on the widget layer.

NOTE: Brackets are essential, even for single class entries. Does not work if they are missing.

You're basically done! But if your looking for the complete deal...continue...

3) Remove Calculator Window Decorations: Go to Menu\Settings\Compiz Config Manager\Window Management\Window Rules

a) Enable the 'Window Rules' Plugin. You will be prompted to enable Regex Matching (if not already enabled) and enable that also.

b) Then within the Windows Rules section, go to Matches and enter/copy+paste

(class=Galculator)

under EACH of the following headings:

  • Skip Taskbar
  • Skip Pager
  • Above
  • Sticky
  • Non-resizable windows
  • Non-minimizable windows
  • Non-maximizable windows
  • Non-closable windows
  • No focus

Now it looks like a true widget.

5) Autostart Calculator to load in Compiz Widget Layer: In Menu\Settings\Settings Manager\System\Session & Startup\Application Autostart\ a) Click the 'add' button with the green cross.

b) Enter name, description, and command for the calculator launcher and click 'Ok'. In my case its,

Name: Galculator

Description: Start Galculator Widget

Command: galculator.

c) Make sure its ticked in the 'Application Autostart' list.

6) Logout & Login Voila!

|improve this answer|||||
-1

The most similar thing I've found is having a calculator in the unity dash. You can install unity-lens-utilities:

sudo apt-get install unity-lens-utilities

Then when you open the dash and type an operation, it gives you the result as a preview. Also the preview is linked to the actual calculator so if you need to do more complex operations you can just click on it.

Good luck!

|improve this answer|||||
  • Hi @darent, Im using Xfce/Xubuntu. Would the unity lens work in my case? – spinge Nov 6 '13 at 13:07
  • I shouldn't think so ;) – 23 93 26 35 19 57 3 89 Nov 6 '13 at 18:56
  • This answer while useful for Ubuntu does not answer an Xubuntu question. – 23 93 26 35 19 57 3 89 Nov 6 '13 at 19:02
  • Well, I was assuming an standard ubuntu installation... it won't work on Xfce and the only way would be to load unity witch could be a total mess... – animaletdesequia Nov 7 '13 at 11:55

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.