Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antingle/functions
An intuitive macOS calculator for your menu bar
https://github.com/antingle/functions
calculations calculator functions launchatlogin macos menubar productivity swift swiftui workflow
Last synced: 26 days ago
JSON representation
An intuitive macOS calculator for your menu bar
- Host: GitHub
- URL: https://github.com/antingle/functions
- Owner: antingle
- License: mit
- Created: 2022-04-15T03:07:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-22T23:57:58.000Z (about 2 years ago)
- Last Synced: 2024-08-03T09:05:50.376Z (4 months ago)
- Topics: calculations, calculator, functions, launchatlogin, macos, menubar, productivity, swift, swiftui, workflow
- Language: Swift
- Homepage:
- Size: 6.84 MB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- Mac-Menubar-Megalist - Functions
README
# Functions
A calculator that lives in your macOS menu bar and keeps a history of your calculations
## Opening
- The app is currently not signed, so simply double clicking the app will not open it
- You must right click the app and choose 'Open'
- You will then receieve a warning popup that the app cannot be checked for malicious software
- You can then choose the button to 'Open' it## Usage
- Calculator can be accessed by pressing the `f(x)` symbol in your menu bar
- ~~The calculator can also be toggled with the global shortcut `option + command + c`~~
- - This is not working yet, since there is no way to currently open a MenuBarExtra programmtically.
- Calculations can be typed and submitted to history by pressing `Enter`
- History is saved even when the app is quit. It can also be cleared.
- Pprevious solutions or expressions can be added to the textfield by clicking on them
- Previous solutions can also be added by cycling through them with arrow keys or the arrow buttons
- Previous solutions can be copied to the clipboard by pressing the copy symbol to the right each submitted solution
- Typing infix operators (excluding `e` and `-`) will insert the previous answer before them for continuous calculations
- A live preview of the calculation is shown while typing an expression### Notes
- Non-valid calculations cannot be submitted to history
- Syntax must be valid (only numbers with supported operators, functions and constants)
- Closing parentheses are added upon submission of an expression if open pairs are missing their closed counterparts### Currently supported math symbols:
**constants**
```swift
pi or π, e
```**infix operators**
```swift
+ - / * % ^ e
```**prefix operators**
```swift
-
```**functions**
```swift
// Unary functionssqrt(x)
floor(x)
ceil(x)
round(x)
cos(x)
acos(x)
sin(x)
asin(x)
tan(x)
atan(x)
abs(x)
ln(x)
log(x) or log10(x)
log2(x)// Binary functions
pow(x,y)
atan2(x,y)
mod(x,y)// Variadic functions
max(x,y,[...])
min(x,y,[...])
```### Credits
- The [Expression](https://github.com/nicklockwood/Expression#math-symbols) framework by Nick Lockwood
- The [KeyboardShortcuts](https://github.com/sindresorhus/KeyboardShortcuts) package by sindresorhus
- The [LaunchAtLogin](https://github.com/sindresorhus/LaunchAtLogin) package by sindresorhus