Ticalc is built to be very small and minimalistic while still retaining aesthetics and functionality. The codebase is contained in only about 450 lines of code that are structured in 2 .c files.
The UI enigne/library used for the interface is libleif which is a minimalistic stb-like immediate mode UI library. (~3500 lines of code). The library uses OpenGL as a graphics backend and glfw is used for window handling.
The calculator is highly configurable and easily extendable due to its very small and readable codebase. As a sidenote, the entire application can be used by only using keyboard shortcuts and number input.
- Install the dependencies
On arch:
paru -S make gcc cglm libclipboard glfw ttf-roboto-monoOn debian:
Note: You will have to build libclipboard yourself. Follow the instructions here.
sudo apt-get install make gcc libglfw3 libglfw3-dev libcglm-dev fonts-roboto- Clone the repository
git clone https://github.com/cococry/ticalc
cd ticalc- Build & Install
sudo make && sudo make installsudo make uninstallThere is a .desktop file that is automatically installed on install that you can access or just run the binary via terminal:
ticalc| Dependency | Reason of Usage |
|---|---|
| leif | Creating the entire UI Frontend |
| libm | Mathematical functions |
| llibclipboard | Handling clipboard |
| libGL | OpenGL Functionality |
| GLFW | Handling windowing, input etc. |
| glad | Loading OpenGL functions |
| stb_image | Loading image files into memory |
| stb_image_resize2 | Resizing images |
| stb_truetype | Loading font glyphs from font files |
| cglm | Linear Algebra Math |
| File | Lines of Code |
|---|---|
| ticalc.c | 345 |
| config.h | 43 |
| eval.h | 2 |
| eval.c | 73 |
| Total | 463 |
You can contribute to ticalc by:
