You are not logged in.

#1 2016-11-11 22:06:33

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,744

bc in urxvt script and what are you using?

bcterm

starts or activates bc wcalc calculator in urxvt window in the middle of the screen.

https://raw.githubusercontent.com/bront … bin/bcterm

Can be linked to some button in wbar or openbox menu or from cli ...

wcalc.th.png

p.s. This was decided to happen after testing about half dozen various GUI calculators out there.

changelog:
- wcalc (history, easier floating-point behavior) replaces bc

to test:
- apcalc (calc -d)

Last edited by brontosaurusrex (2016-11-14 11:28:09)

Online

#2 2016-11-12 08:52:55

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: bc in urxvt script and what are you using?

Like it. Nice one.

I prefer qalc to bc. The one I use actually. Will borrow your script with a twist.

Offline

#3 2016-11-12 14:00:34

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: bc in urxvt script and what are you using?

funny how you always end up with 42...

anyhow, i'm using xcalc.

Offline

#4 2016-11-13 11:38:03

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,744

Re: bc in urxvt script and what are you using?

Actually much more interesting than this script is the info on what you people are using. Keep them coming. A "why" would be great addition as well. p.s. about 42; big fan of Douglas Adams.

Last edited by brontosaurusrex (2016-11-13 11:41:08)

Online

#5 2016-11-13 13:45:32

pvsage
Internal Affairs
Registered: 2015-09-29
Posts: 1,433

Re: bc in urxvt script and what are you using?

Interesting idea.  What options/alternatives are available with decimal justification, which was the standard for printing calculators?


Be excellent to each other, and...party on, dudes!
BunsenLabs Forum Rules
Tending and defending the Flame since 2009

Offline

#6 2016-11-13 15:00:44

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,744

Re: bc in urxvt script and what are you using?

Lots of options to explore here (answer 231)
http://unix.stackexchange.com/questions … frameworks

Online

#7 2016-11-13 15:49:33

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: bc in urxvt script and what are you using?

I prefer to use the Korn shell's built-in let command and double-bracketed arimethic expansion, as per http://www.ibm.com/support/knowledgecen … h_eval.htm, mainly because I always have a shell open anyway.

For more complex operations, I prefer xcalc(1) -- death to toolkits! ]:D

Offline

#8 2016-11-13 16:06:30

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,744

Re: bc in urxvt script and what are you using?

HOAS, like:

echo $((3/2)) # ?

Online

#9 2016-11-13 16:19:26

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: bc in urxvt script and what are you using?

^ Yes, exactly so.

Although I prefer:

print $((3/2))

The print built-in for ksh is much nicer than echo...

8)

Actually, this is a bad axample because ksh(1) doesn't do floating-point -- I have to use zsh for that:

http://zsh.sourceforge.net/Doc/Release/ … ation.html

Offline

#10 2016-11-13 17:10:12

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,744

Re: bc in urxvt script and what are you using?

I like wcalc more and more, the problem is it will always print "Enter an expression to evaluate, q to quit, or ? for help" when starting interactive session.

Last edited by brontosaurusrex (2016-11-13 17:10:32)

Online

Board footer

Powered by FluxBB