rice/dots/.scripts/dmenucalc

11 lines
208 B
Text
Raw Permalink Normal View History

2021-03-11 00:07:19 +02:00
#!/bin/sh
docalc() {
res=$(true | dmenu -p "calc" | bc -l)
2021-03-11 00:07:19 +02:00
[ "$res" = "" ] && exit
next=$(printf "exit\nnext" | dmenu -p "calc;res=${res}")
[ "next" = "${next}" ] && docalc || exit
}
docalc