pacmax beta

Alfred Pac by wolph on GitHub

converter

Alfred unit converter is a smart calculator for Alfred with support for unit conversions to make it a bit comparable to the Google Calculato

From their README

Alfred Unit Converter

Alfred unit converter is a smart calculator for Alfred with support for unit conversions to make it a bit comparable to the Google Calculator and Wolfram Alpha.

Issues

If new units and/or other names for units should be added please let me know by creating an issue at: https://github.com/WoLpH/alfred-converter/issues

Installation

To install use the following link:

https://github.com/WoLpH/alfred-converter/releases/latest/download/unit_converter.alfredworkflow

Requirements

This workflow supports Python 3.8+.

Configuration

The extension can be configured through the environment variables setting in Alfred.

::

BASE_2: Enable base 2 (binary ) output
BASE_8: Enable base 8 (octal) output
BASE_16: Enable base 16 (hexadecimal) output
DECIMAL_SEPARATOR: Comma or dot separator for decimals
FRACTIONAL_UNITS: "both", "decimal" or "fractional" only
OUTPUT_DECIMALS: Number of decimals to show for decimal output
FRACTION_PRECISION: Maximum denominator for fractional output
FRACTIONAL_MAX_DEVIATION: Maximum allowed deviation for fractional output
CURRENCY_DEFAULT_TARGETS: Currency targets to show for short queries such as "5 usd". Defaults to usd,eur,gbp,jpy,cny,cad,aud
MAX_MAGNITUDE: Maximum orders of magnitude to show. For 1 megabyte in bytes we need 9 orders of magnitude because it's 1 million bytes.
UNITS_BLACKLIST: Units you wish to hide
UNITS_SIDE: Showing the units at the right or the left side

Currency conversion

Currency conversions use daily cached rates from the free fawazahmed0 exchange-api. Normal unit and calculator queries never block on currency network access.

Currency examples:

::

2000 isk eur
2000 isk to eur
2000 isk in eur
5 usd

Rates refresh automatically on the first currency use of a new day. If cached rates are stale, Alfred shows the stale result immediately while a background refresh runs. If no rates exist yet, Alfred shows a rates-updating item; retry the query shortly after.

Short currency queries such as 5 usd show the configured default target currencies. The default list is usd,eur,gbp,jpy,cny,cad,aud and can be changed with CURRENCY_DEFAULT_TARGETS in the Alfred workflow configuration. Currency results include symbols and target-currency icons. Currencies with a clear country or region use flag badges; ambiguous regional and special currencies keep neutral currency badges.

To update a base currency manually:

::

currency-update isk

Math notes

log() is the natural logarithm. ln() is an alias for log(). Use log10() for base-10 logarithms.

Example queries

::

1m in cm # Just a simple conversion
2^30 byte # Using powers before conversion
5' # Converting units with special characters
20" # Like above
5 * cos(pi + 2) # Executing mathematical functions
5 * pi + 2 mm in m # Mathematical constants with unit conversion
1 * cos(pi/2) - sin(pi^2) # More advanced mathematical expressions
ln(e^10) # Testing the ln(x) alias of log _e(x)
log(e^10) # The normal log method
log10(e^10) # Base-10 logarithm
5+3^2" in mm # Testing math with unit conversion
1 + 2 / 3 * 4) mm^2 in cm^2 # Unbalanced paranthesis with unit conversion
((1 + 2 / 3 * 4) mm^2 in cm^2 # Unbalanced paranthesis the other way
inf - inf # Not actually possible, but we backtrack to "inf"
0b1010 + 0xA - 050 # Test calculations with hex, oct and binary numbers

.. image:: https://raw.githubusercontent.com/WoLpH/alfred-converter/master/examples/currency.png

.. image:: https://raw.githubusercontent.com/WoLpH/alfred-converter/master/examples/bytes.png

.. image:: https://raw.githubusercontent.com/WoLpH/alfred-converter/master/examples/exponent_rounding.png

.. image:: https://raw.githubusercontent.com/WoLpH/alfred-converter/master/examples/mathematical_functions.png

.. image:: https://raw.githubusercontent.com/WoLpH/alfred-converter/master/examples/square_metres.png

.. image:: https://raw.githubusercontent.com/WoLpH/alfred-converter/master/examples/bin_oct_hex.png

The list of units and conversions was downloaded from: http://w3.energistics.org/uom/poscUnits22.xml

Support

alfred-converter is maintained by Rick van Hattem _ in his own time.

If it saved you an afternoon, a tip covers an hour of issue triage: Ko-fi _ or GitHub Sponsors _.

If your company funds its dependencies, this package is on thanks.dev _.

.. image:: https://ko-fi.com/img/githubbutton_sm.svg :target: https://ko-fi.com/wolph_gh :alt: Support on Ko-fi

Latest release

  • 2026.06.155 months ago, 13.0 MBDownload

    Highlights

    • Added cached currency conversion with daily rates.
    • Added currency icons, configurable default targets, and currency-update.
    • Improved conversion ordering by result magnitude.
    • Filtered rare time units that produced awkward results.
    • Documented log() as natural logarithm and log10() for base-10 logarithms.

    Workflow version: v2026.06.15

19 earlier releases
  • 2026.04.29.35 months ago, 13.0 MBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2026.04.29.3
    • Date: 2026-04-29
    • Commit: 9783b2fa989c0110facfa6292042b55fa848c303
    • Source change: feat: add Alfred-style currency icons
  • 2026.04.29.25 months ago, 387 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2026.04.29.2
    • Date: 2026-04-29
    • Commit: 71e331dede679e5e9acb2c582ba5d4ec3448454a
    • Source change: feat: improve currency query UX
  • 2026.04.295 months ago, 384 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2026.04.29
    • Date: 2026-04-29
    • Commit: 32e18ff78cf75b643c9a107a87328c49698bb8fc
    • Source change: feat: add cache-backed currency conversions
  • 2024.01.025 months ago, 506 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2024.01.02
    • Date: 2024-01-02
    • Commit: 09308ae7839ebfe1f3c220f18065bbde6ea5bff4
    • Source change: restored python 3.7 compatiblity for older OS X versions
  • 2023.08.20.25 months ago, 497 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2023.08.20.2
    • Date: 2023-08-20
    • Commit: 9041e282c00bbf7a7afea807b05dd4e12f47c1c9
    • Source change: Updated default configuration
  • 2023.08.205 months ago, 497 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2023.08.20
    • Date: 2023-08-20
    • Commit: 0b1ee509b2f963bc8cb8c6b20dbbce30db1c6abe
    • Source change: Added support for limiting fraction precision so metric/imperial conversion give useful results. Also added some type hinting and improved code quality for easier testing and development
  • 2023.08.045 months ago, 461 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2023.08.04
    • Date: 2023-08-04
    • Commit: 69f6763964758f75f528510d1757e0ed8dc682b3
    • Source change: Added OUTPUT_DECIMALS to configurable options
  • 2023.03.265 months ago, 461 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2023.03.26
    • Date: 2023-03-26
    • Commit: 179451693732749a8e46bd9e50840194d0d31932
    • Source change: updated the workflow file with the pull requests from @aaronkollasch
  • 2023.02.25.25 months ago, 461 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2023.02.25.2
    • Date: 2023-02-25
    • Commit: e1f3546334f198dfbffafa5183d18e89178b8807
    • Source change: removed debug code
  • 2023.02.255 months ago, 461 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2023.02.25
    • Date: 2023-02-25
    • Commit: d815d618678f2ee3422eb518250ab6dac548e4b5
    • Source change: fixed #52 with silly environment variable values
  • 2022.12.245 months ago, 461 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.12.24
    • Date: 2022-12-24
    • Commit: e90e7e21eaa6ffb9f9a0c7f43d65eb23593278ba
    • Source change: converted to alfred settings
  • 2022.12.155 months ago, 460 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.12.15
    • Date: 2022-12-15
    • Commit: 840c0958bb093742457449e7b78c53f46b434502
    • Source change: new release to include new log10 and log2 functions
  • 2022.11.285 months ago, 675 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.11.28
    • Date: 2022-11-28
    • Commit: 632277cb9b4d1488b51c9949b795411726bf10a9
    • Source change: fix: /usr/bin/env/python3 instead of system python
  • 2022.10.20.45 months ago, 460 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.10.20.4
    • Date: 2022-10-20
    • Commit: 49f3053932ee4ef13cecdeccc030fa52e5cab4b9
    • Source change: ran the code formatter
  • 2022.10.20.35 months ago, 460 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.10.20.3
    • Date: 2022-10-20
    • Commit: 6cc3d18a3c49c12a30e2b72c12bf8ab5b3336c49
    • Source change: added precompile step to queries so advanced calculations with units still work
  • 2022.10.20.25 months ago, 460 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.10.20.2
    • Date: 2022-10-20
    • Commit: cf257f0f98d438460182bc6391f4710f3a0e341f
    • Source change: start with base conversion to fix #32
  • 2022.10.205 months ago, 460 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.10.20
    • Date: 2022-10-20
    • Commit: 60c50631c9c00f9f0efd247683ed30de29e2ca14
    • Source change: added many more tests and added support for choosing the units side
  • 2022.07.245 months ago, 459 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.07.24
    • Date: 2022-07-24
    • Commit: 7c74c57a46a970404b9b96d1f89e60eeb9a527e7
    • Source change: Reverting to /usr/local/bin/python because it is much faster
  • 2022.04.215 months ago, 450 KBDownload

    Historical Alfred workflow archive backfill.

    • Tag: v2022.04.21
    • Date: 2022-04-21
    • Commit: ef3cd13487d7181e1410340955ff4a5948cd39c8
    • Source change: Removed debug statement