svenstaro/rofi-calc
Free🖩 Do live calculations in rofi!
FreeFree tier
About svenstaro/rofi-calc
rofi-calc is an open-source rofi plugin that integrates the powerful qalculate library (qalc) to provide live, natural language calculations directly within the rofi launcher. It supports arithmetic operations, unit conversions (e.g., '5000 EUR to USD'), percentage calculations, and solving linear equations (e.g., '60x + 30 = 50'). The tool displays results in real-time as you type, allows copying results via custom shell commands, and maintains a history file for quick access to previous calculations.
Key Features
Natural language input via qalculate's qalc (e.g., '500 + 25%', '150 to hex')
Unit conversions (currency, length, etc.)
Solves linear equations in real-time
Seamless integration with rofi as a custom modus
Persistent calculation history stored at $HOME/.local/share/rofi/rofi_calc_history
Customizable output command to copy or type results
Supports terse mode, Unicode toggle, and custom qalc binary path
Pros & Cons
Pros
- Free and open-source (MIT license)
- Leverages the powerful qalc engine for accurate and natural input parsing
- Integrates directly into rofi, a popular window switcher and launcher
- Lightweight and fast, with minimal dependencies beyond rofi and qalculate
- Supports custom actions (e.g., copy result to clipboard) via shell commands
Cons
- Requires rofi (version >= 1.7.6) and qalculate (version >= 2.0) as dependencies
- Primarily a plugin; does not function as a standalone calculator outside of rofi
- Output formatting limited to what qalc provides by default
- No graphical user interface beyond rofi's own interface
Best For
Quick arithmetic calculations without leaving the rofi interfaceConverting currencies or units on the flyPerforming percentage calculations (e.g., discounts, taxes)Solving basic linear equationsAccessing a history of recent calculations for reuse