How to use math input in GIMP
libregraphicsworld.org
libregraphicsworld.org
output=$(echo "$(xclip -o)" | bc) # take the X clipboard and run it through bc
sleep 0.2s # wait before continuing or else this won't work
xdotool key BackSpace # clear the selection
printf $output | xclip -i # write the output to the X clipboard
xdotool click 2 # paste the result by clicking the middle button
I set this as Super-E on my computer and probably will use it every once in a while for programs which don't implement math input.In other words, with this you can select text containing mathematical operations, press a key combination, and the selected text will be replaced by the result of the math.
Improvements welcome. There probably are better ways to do this.
I mean, what else could it do? That this needs to be said makes me strangely sad :(
[1] https://en.wikipedia.org/wiki/VisiCalc
[2] https://scs.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=...
I was hoping I would learn that you could do parametric formulas to define curves, and maybe even Taylor series for curves too hard to define in closed form. Someday.
In YNAB, it's essential, so I'm glad they have it.