Skip to content

rudrabhoj/numnum

Repository files navigation

NumNum

A text editor that does math. Type what you're thinking, get answers as you type.

No buttons, no keypad. Just a blank page that understands numbers, units, currencies, and percentages in plain language. Results appear on the right, lined up with what you wrote. Click any result to copy it.

Blazingly fast. GPU-rendered UI powered by Zed's GPUI framework, the same engine behind the fastest code editor on the planet. Written in Rust. Open source. Cross-platform.

NumNum

How it works

rent = 45000 INR                              ₹ 45,000
groceries = 12000 INR                         ₹ 12,000
utilities = rent * 5%                         ₹ 2,250
total = rent + groceries + utilities          ₹ 59,250
total in USD                                  $709.28

5 m * 3 m                                    15 m²
60 km / 2 hours                               30 km/h
220 V * 10 A                                  2,200 W

500 kcal in kJ                                2,092 kJ
20% of what is 11.68 cm                       58.4 cm
0xff in decimal                               255

You type on the left. Results show up on the right. Change a variable and everything downstream updates. That's it.

What it understands

Math. Full arithmetic with operator precedence, parentheses, and nested functions (sin, cos, sqrt, log, abs, round, 18 total). Variables persist across lines. Compound assignments (tax += 5) work.

170+ currencies. Symbols ($, , , £, ¥), ISO codes (USD, INR, GBP), and full names (indian rupee, swiss franc). Rates pulled live on startup, cached in SQLite, with a hardcoded fallback for offline use.

100+ units. Length, mass, time, temperature, area, volume, data, power, energy, voltage, current, resistance, frequency. Write 60 km / 2 hours and get 30 km/h. Write 220 V * 10 A and get 2,200 W. Shorthands like mph, kmh, kbps work. So does the word per (100 km per hour).

Percentages in plain English. 20% of 500, 20% on 500, 20% off 500, 15% of what is 75, or inline: 500 + 10%.

Number formats. US (1,234,567.89), Indian (12,34,567.89), European (1.234.567,89). Paste formatted numbers from a spreadsheet and they parse correctly in the active locale.

Representations. 255 in hex, 10 in binary, 0xff in decimal, scientific notation.

Aggregation. sum, average, prev reference results from earlier lines.

The editor

NumNum is not a CLI tool or a widget. It's a proper text editor with:

  • Syntax highlighting tuned for math expressions
  • Autocomplete that knows every function, unit, currency, and variable in scope
  • Double-click to select a word, triple-click for a line
  • Undo/redo, cut/copy/paste, soft line wrapping
  • Ctrl+scroll to change font size on the fly

Results on the right scroll with the editor and stay aligned, even when lines wrap. Click any result to copy it to the clipboard.

Session persistence

Your work is automatically saved. Every calculation lives in a named session that persists across restarts. No manual save, no dialogs.

  • Sessions are stored as JSON in your platform's data directory (~/.local/share/numnum/sessions/ on Linux/FreeBSD)
  • The most recent session is restored automatically when you reopen NumNum
  • Click the burger menu in the top-right to switch between sessions or start a new one
  • Hover over a session in the list to reveal a close button
  • Empty sessions are cleaned up automatically so they don't clutter the list

Session Menu

Looks

8 color themes ship out of the box: Catppuccin Mocha, Catppuccin Latte, Tokyo Night, Tokyo Night Day, Rose Pine Moon, Rose Pine Dawn, Zed One Dark, Zed One Light.

Drop a .toml file in ~/.config/numnum/themes/ to add your own. Dark, light, and auto (follows system) appearance modes.

Optional custom titlebar with macOS-style traffic light buttons, or use your system's native one, or go with no titlebar at all.

Font

NumNum looks best with Maple Mono NF (the default). Install it before running:

# macOS / Linux (Homebrew)
brew install --cask font-maple-mono-nf

# Arch Linux
paru -S ttf-maplemono-nf-unhinted

# Windows (Scoop)
scoop bucket add nerd-fonts
scoop install Maple-Mono-NF

Or grab it from the releases page. Any monospace font works, but Maple Mono NF is what NumNum is designed around. You can change the font in settings.

Install

Prebuilt packages for every platform are attached to each release. Every file is named the same way: NumNum-<version>-<os>-<arch>.<ext>.

Linux

Linux packages are built for both x86_64 and aarch64. Pick the file matching your machine.

# Debian / Ubuntu
sudo apt install ./NumNum-*-linux-x86_64.deb

# Fedora / RHEL / openSUSE
sudo dnf install ./NumNum-*-linux-x86_64.rpm

# Arch / Arch Linux ARM
sudo pacman -U ./NumNum-*-archlinux-x86_64.pkg.tar.zst

Or download NumNum-<version>-linux-<arch>.tar.xz and put the numnum binary on your PATH.

macOS

Download NumNum-<version>-macos.dmg, open it, and drag NumNum to Applications. The binary is universal, so one download runs on both Intel and Apple Silicon.

NumNum is not signed with an Apple Developer ID, and macOS Sequoia (15) and later removed the old Control-click bypass. First launch: double-click NumNum, dismiss the warning, then open System Settings -> Privacy & Security, scroll to the bottom and click Open Anyway next to the NumNum entry. You only do this once.

If you prefer the terminal, strip the quarantine attribute and the app opens normally:

xattr -d com.apple.quarantine /Applications/NumNum.app

Windows

Download NumNum-<version>-windows-x86_64.exe and run it. It installs to Program Files with a Start Menu shortcut and an uninstaller. A portable NumNum-<version>-windows-x86_64.zip is also attached if you would rather not install.

The installer is unsigned, so on first launch Windows Defender SmartScreen shows Windows protected your PC. Click More info then Run anyway. You can also unblock the file in PowerShell before running it:

Unblock-File .\NumNum-*-windows-x86_64.exe

If you have Smart App Control turned on (off by default on most systems, enabled only on some clean Windows 11 installs), it has no per-app override; you would have to disable it system-wide to install.

FreeBSD

sudo pkg install ./NumNum-*-freebsd-x86_64.pkg

Or use the NumNum-<version>-freebsd-x86_64.tar.xz archive.

Window manager tips (Hyprland, Niri)

NumNum is a small utility window. On a tiling Wayland compositor it feels best floating, borderless, and pinned, so it acts like a quick scratchpad instead of claiming a tile. It sets its Wayland app-id (and X11 WM_CLASS) to numnum, which is what these rules match on.

Hyprland

Add to ~/.config/hypr/hyprland.conf:

# NumNum calculator
windowrule = float on, match:class numnum
windowrule = pin on, match:class numnum
windowrule = border_size 0, match:class numnum

Niri

Add to ~/.config/niri/config.kdl:

// NumNum calculator
window-rule {
    match app-id="numnum"
    open-floating true
    border {
        off
    }
    focus-ring {
        off
    }
}

Building from source

You'll need

  • Rust 1.85+ (edition 2024)
  • A C/C++ compiler
  • CMake

Install Rust via rustup if you don't have it:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Plus platform-specific libraries:

Linux (Debian/Ubuntu)

sudo apt install \
  build-essential cmake clang mold \
  libasound2-dev libfontconfig-dev libssl-dev \
  libwayland-dev libx11-xcb-dev libxkbcommon-x11-dev \
  libzstd-dev libsqlite3-dev libvulkan1 libva-dev \
  libglib2.0-dev
./build_install_linux_bsd.sh

Linux (Fedora)

sudo dnf install \
  gcc g++ cmake clang mold \
  alsa-lib-devel fontconfig-devel openssl-devel \
  wayland-devel libxcb-devel libxkbcommon-x11-devel \
  libzstd-devel sqlite-devel vulkan-loader libva-devel \
  glib2-devel
./build_install_linux_bsd.sh

Linux (Arch)

sudo pacman -S \
  gcc clang cmake mold \
  alsa-lib fontconfig openssl \
  wayland libxcb libxkbcommon-x11 \
  zstd sqlite vulkan-icd-loader libva \
  glib2
./build_install_linux_bsd.sh

FreeBSD

sudo pkg install cmake llvm git alsa-lib libX11 sqlite3
./build_install_linux_bsd.sh

NumNum sets RUST_LIB_BACKTRACE=0 itself on FreeBSD to work around a GPUI performance issue, so no shell setup is needed.

The install script builds the release binary, copies it to ~/.local/bin/, sets up the desktop entry and icon, and optionally configures Hyprland or Niri window rules.

macOS

Xcode is required for Metal shader compilation and system frameworks.

xcode-select --install
brew install cmake
cargo build --release

Windows

Visual Studio 2022 (or Build Tools) with the "Desktop development with C++" workload and a Windows 10/11 SDK.

cargo build --release

If the build can't find fxc.exe (HLSL shader compiler), point GPUI_FXC_PATH at your Windows SDK bin directory.

Run it

cargo run --release

Binary lands at target/release/numnum.

Configuration

Settings file: ~/.config/numnum/settings.toml (Linux/FreeBSD), ~/Library/Application Support/numnum/settings.toml (macOS), %APPDATA%/numnum/settings.toml (Windows).

Everything is configurable from the in-app settings pane (click the gear icon): font family and size, decimal precision, number format, color theme, appearance mode, titlebar style, and more.

Built with

  • GPUI for GPU-accelerated rendering (from the Zed editor)
  • cosmic-text for text shaping
  • Pratt parser for expression evaluation
  • SQLite for exchange rate caching

License

NumNum is licensed under GPLv2. The vendored GPUI crates are licensed under Apache 2.0.

About

Blazingly fast GPU rendered open source alternative to Numi. It is a notebook calculator that understands maths in plain english. Built with Rust and GPUI.

Topics

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-APACHE

Stars

Watchers

Forks

Packages

 
 
 

Contributors