Added calculator functionnality#217
Open
F-4Dev wants to merge 10 commits intophilj56:masterfrom
Open
Conversation
|
@F-4Dev I think you can check the documentation box :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've extended the codebase to allow for modules like doing math or doing a web search to be added fairly easily.
This pull request includes those two examples. Modules are asked to add their suggestion to the results array, importantly module suggestions must start with a prefix (e.g.
=for calcuations?for searches). Then when the user selects the result of an module, the module can process text-input and its own suggestion to do a task. All modules can be disabled in the config file.The Math modules uses
qalcorlibqalculatefrom the AUR as the "calculation backend" which is now a required dependency (at least we think so)The PR also includes functionality for the delete key to remove the next character :D
Still todo is:
(A temporary fix for that is adding
&& wl-copy ""behind your key bind)"breaks the calculation moduleSadly
^cant be used for e.g. doing math, presumably it's a "dead key" and there doesn't seam to be any easy workaround. You can still use**to do exponents though: e.g.3**4 = 3⁴Should close #172 and #183