rice/dots/.scripts/dmenucalc

10 lines
208 B
Bash
Executable file

#!/bin/sh
docalc() {
res=$(true | dmenu -p "calc" | bc -l)
[ "$res" = "" ] && exit
next=$(printf "exit\nnext" | dmenu -p "calc;res=${res}")
[ "next" = "${next}" ] && docalc || exit
}
docalc