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
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
under EACH of the following headings:
- Skip Taskbar
- Skip Pager
- 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,
Description: Start Galculator Widget
c) Make sure its ticked in the 'Application Autostart' list.
6) Logout & Login Voila!