xcalc

From ArchWiki

xcalc is a scientific calculator for the X Window System.

Installation

Install the xorg-xcalc package.

Configuration

There are several options you can set in your X resources files to make xcalc look much better than the default black text on white background. The position, label, function and colour can be individually changed for each button. See xcalc(1) § CUSTOMIZATION for more information.

Theming

xcalc has a built in theme emulating the looks of a Texas Instruments TI-30. See xcalc(1) § COLORS on how to enable it.

If you just want some nicer looking colours, you can try out this theme.

~/.Xresources
XCalc.geometry:                        200x275
XCalc.stipple:                         true
XCalc.ti.Command.background:           #777777
XCalc.ti.Command.foreground:           White
XCalc.ti.bevel.background:             #111111
XCalc.ti.bevel.screen.DEC.background:  #000000
XCalc.ti.bevel.screen.DEC.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.DEG.background:  #000000
XCalc.ti.bevel.screen.DEG.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.GRAD.background: #000000
XCalc.ti.bevel.screen.GRAD.foreground: LightSeaGreen
XCalc.ti.bevel.screen.HEX.background:  #000000
XCalc.ti.bevel.screen.HEX.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.INV.background:  #000000
XCalc.ti.bevel.screen.INV.foreground:  Red
XCalc.ti.bevel.screen.LCD.background:  #000000
XCalc.ti.bevel.screen.LCD.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.LCD.shadowWidth: 0
XCalc.ti.bevel.screen.M.background:    #000000
XCalc.ti.bevel.screen.M.foreground:    LightSeaGreen
XCalc.ti.bevel.screen.OCT.background:  #000000
XCalc.ti.bevel.screen.OCT.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.P.background:    #000000
XCalc.ti.bevel.screen.P.foreground:    Yellow
XCalc.ti.bevel.screen.RAD.background:  #000000
XCalc.ti.bevel.screen.RAD.foreground:  LightSeaGreen
XCalc.ti.bevel.screen.background:      #000000
XCalc.ti.button4.background:           Orange3
XCalc.ti.button5.background:           Red4
XCalc.ti.button23.background:          #611161
XCalc.ti.button24.background:          #611161
XCalc.ti.button35.background:          #611111
XCalc.ti.button37.background:          #222262
XCalc.ti.button38.background:          #222262
XCalc.ti.button39.background:          #222262
XCalc.ti.button40.background:          #722222
XCalc.ti.button42.background:          #333373
XCalc.ti.button43.background:          #333373
XCalc.ti.button44.background:          #333373
XCalc.ti.button45.background:          #833333
XCalc.ti.button47.background:          #444484
XCalc.ti.button48.background:          #444484
XCalc.ti.button49.background:          #444484
XCalc.ti.button50.background:          #944444
XCalc.ti.button52.background:          #555595
XCalc.ti.button53.background:          #555595
XCalc.ti.button54.background:          #555595
XCalc.ti.button55.background:          #a55555

Change the division label

You can change the division symbol to a forward slash if you prefer.

XCalc.ti.button35.label: /

Desktop entry

xcalc will not show up in the application menu since it does not come with a desktop entry. To make it appear in the menu, you can add a desktop entry.

~/.local/share/applications/xcalc.desktop
[Desktop Entry]
Name=XCalc
GenericName=Scientific Calculator
Comment=Scientific calculator for X
Exec=xcalc
Icon=accessories-calculator
Terminal=false
Type=Application
StartupNotify=true
Keywords=calculator;scientific;
Categories=Utility;Calculator;

The menu entry will appear as XCalc in the Utility → Calculator application list.

See also