Warning : This repository/project is no longer maintained. I'm no longer using KDE's KRunner. If you are interested in the plugin, it's free software under the GPL-3.0 license, so you can create a fork and do any thing you want with it.
If you want an alternative, Qalculate!
is a good project, you can convert currencies using it.
Warning This plugin is not well tested and it should be improved. Don't use it for sensitive operations.
A KRunner plugin for converting currencies using DuckDuckGo spice API.
If you dan't have
requests
installed theinstall.sh
script will usepip
to install it.Install from git source code
Go to the directory that you want to keep the code in it, for example
/home/<username>/.local/share/krunner-sources/
.$ git clone https://github.com/zer0-x/krunner-currency.git $ cd krunner-currency $ ./install.sh
🔴 Don't delete the source code after the installation.
Uninstall
Go to the source code directory and run the uninstall script:
$ ./uninstall.sh
search
> KRunner
Get New Plugins...
Install
Please run the uninstall script manually, because the GUI will remove the script before running it.
You are able to use any type of the following terms:
13 SAR USD
13.64 sar usd
13 SAR $
13 SR $
13 US euro
- Not available yet.13 dollars riyal
- Not available yet.
Not all the currencies are supporter when using a symbol or a name. Take a lock on the
data/
directory.qeury
- Type the keyword
~
in KRunner.- type
<Space>
and then writer your conversion term.- Click
<Enter>
to flip the conversion.- Also you are able to use the actions to copy the result, copy the conversion or copy the URL for the conversion in xe.com
The amount to be converted will not be sent to the API, but it will query the value of 1 currency unit to get the rate, then it will do the conversion locally.
If i found a good reference for the Config method in KRunner i would've done this in a UI, but i didn't so you need to edit the source code for that feature.
Go to the source directory and open 'converter.py', then comment and uncomment the following lines:
@@ -10,6 +10,6 @@
@@ -17,5 +17,5 @@
import converter
convert = converter.Converter()
# Parsing the input then returning the result
term = "48.120 eur sa"
result = convert(term)
# Or giving direct data without the need te be parsed
# amount: float, from_currency: str, to_currency: str
result = convert.get_results(48.120, "EUR", "SAR")