7 ms·
After trying a lot of different calculators, I just settled on this little shell script to launch/raise a nodejs repl with FN+Backpspace: if [ $(xdotool sear
by phoboslab 5y ago
After trying a lot of different calculators, I just settled on this little shell script to launch/raise a nodejs repl with FN+Backpspace:
if [ $(xdotool search --name "calc repl") ]; then
xdotool search --name "calc repl" windowraise
else
xfce4-terminal \
--title="calc repl" \
--color-bg=#123 \
--color-text=#fec \
--hide-scrollbar \
--font="Deja Vu Sans Mono 14px" \
--geometry 40x14 \
--execute node -i -e "$JSREPL"
fi
($JSREPL just contains some extra functions that I want in a calculator)
I can easily go back to previous calculations and results, define vars, run loops whatevs. Having it on a key combo and launching the terminal with a distinct text/bg color really makes a difference. It also launches faster than most other calculators I tried. For my purposes (non-scientific, mostly programming stuff), it's been great.
- shaicoleman 5y agoYou need to be very careful, as you may get wrong results due to rounding and floating point errors. $ node -i > 2**54+2 18014398509481984 > 3-3.01 -0.009999999999999787 Other calculators such as calc [1] don't have these issues 1. https://github.com/lcn2/calc https://github.com/lcn2/calc