GithubHelp home page GithubHelp logo

repocalc's Introduction

Reverse Polish Calculator

v1.1.0

RepoCalc is an RPN calculator inspired by the Suckless Philosophy that uses an ncurses UI.

Installation

Arch Linux

RepoCalc is available in the AUR

From Source

RepoCalc should build on any *nix system that has a c compiler, a standard library, ncurses, pkg-config, and make. If it fails to build or run on your system, please report the issue on the Issues page so it can be fixed. I hope to achieve a fair degree of platform-independence, so I will try and fix compatibility issues as they arise.

The basic installation process:

git clone https://github.com/drdonahue/repocalc
cd repocalc
make
sudo make install

Configuration

All of the keybindings can be edited in config.h (if it doesn't exist run make or cp config.def.h config.h). There are 2 special keybindings that you can change by modifying the define statements: Backspace and Exit. The bindings for setting precision and changing the display mode are also set with define statements. All other keybindings can be changed by editing the Keybind keys[] initialization list. This is also where new keybindings can be added.

Custom functions can be defined in customfuncs.h and customfuncs.c. They follow this template:

void <function name> (stk_elem ** stack, double * input, unsigned int * cursorpos, const Arg * arg);

Once the function is defined, simply add a line to the keys[] initialization list in config.h to map it to a key. Run make to build repocalc with your function.

If your function requires a constant argument (ie alter behavior depending on which keypress called it), add a field for it to the Arg struct in structs.h. You can then set the argument in the keys[] initializer list.

Contributing

If you think that RepoCalc is missing important functionality or want to otherwise improve it, feel free to either create an issue with suggestions or create a fork and implement your changes there so they can be merged in.

repocalc's People

Contributors

drdonahue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

repocalc's Issues

[BUG] Screen does not clear on application exit

Describe the bug
On ttys using sh or bash, the screen does not clear when RepoCalc is closed. This leaves the tty looking like:

foo@bar ~ $5 NRM: F6 SCI: F7 ENG F8 Exit: F10 Help: ?

To Reproduce
Steps to reproduce the behavior:

  1. Run in bash from a tty
  2. Exit the program

Expected behavior
Bash prompt is not drawn over the bottom bar of RepoCalc. Either the screen clears or a new line separates the text from RepoCalc from bash

Desktop (please complete the following information):

  • OS: Linux, freeBSD
  • Version 1.0.1

[BUG] Backspace doesn't work

Describe the bug
Can't delete the last character by pressing the Backspace key.

To Reproduce
Steps to reproduce the behavior:

  1. Run from manjaro/zsh
  2. Type '1"
    3 Press 'Backspace"
  3. See '1' is still there

Expected behavior
The last char should be removed / disappear.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux 5.10.70-1-MANJARO #1 SMP PREEMPT Thu Sep 30 15:29:01 UTC 2021 x86_64 GNU/Linux
  • Version: RepoCalc 1.1.0

Additional context
Also not working on bash or sh.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.