Skip to content

Calculator

The native interface includes a built-in calculator that evaluates mathematical expressions as you type.

Simply type a mathematical expression in the launcher, and the calculator will automatically detect and evaluate it. Results can be copied to the clipboard using Enter.

5 + 3
# Result: 8

The calculator supports common mathematical functions:

FunctionDescriptionExample
sqrt(x)Square rootsqrt(16) → 4
sin(x)Sine (radians)sin(0) → 0
cos(x)Cosine (radians)cos(0) → 1
tan(x)Tangent (radians)tan(0) → 0
log(x)Base-10 logarithmlog(100) → 2
ln(x)Natural logarithmln(2.718) → ~1
exp(x)Exponential (e^x)exp(1) → ~2.718
abs(x)Absolute valueabs(-5) → 5
floor(x)Round downfloor(3.7) → 3
ceil(x)Round upceil(3.2) → 4

You can combine multiple operations and functions:

sqrt(16) + abs(-5)
# Result: 9
  1. Launch Raffi in native mode
  2. Type a mathematical expression
  3. The result appears automatically
  4. Press Enter to copy the result to clipboard
Calculator example
  • Enter: Copy result to clipboard
  • Esc: Clear input and return to normal mode

The calculator is enabled by default in native mode. To disable it:

addons:
calculator:
enabled: false
addons:
calculator:
enabled: true

Install wl-clipboard on your system:

Terminal window
sudo pacman -S wl-clipboard
Basic Calculations
2 + 2 → 4
10 - 3 → 7
5 * 4 → 20
100 / 4 → 25
2 ^ 10 → 1024
Scientific Functions
sqrt(144) → 12
abs(-42) → 42
floor(3.9) → 3
ceil(2.1) → 3
exp(0) → 1
ln(1) → 0
Trigonometry
sin(0) → 0
cos(0) → 1
tan(0) → 0
Complex Expressions
sqrt(16) * 5 → 20
(10 + 5) * 2 → 30
2 ^ 3 + sqrt(9) → 11
abs(-5) * floor(3.7) → 15
exp(ln(100)) → 100