#!/bin/sh
EXPRESSION=$(printf "" | dmenu -b -w $(xdotool getactivewindow) -p "calculator")
RESULT=$(qalc $EXPRESSION)
printf "" | dmenu -b -w $(xdotool getactivewindow) -p "$RESULT"
echo $RESULT | sed 's/^[^=≈]*[=≈]//' | xclip -selection clipboard

# start qalc in terminal instead
#st -i -g 60x30+200+200 -e qalc
