Files
dots/.config/scripts/util/dcalc
2023-07-08 15:20:41 +03:00

24 lines
345 B
Bash
Executable File

#!/bin/bash
choice=$(echo -e " " | dmenu -p "calc")
while :; do
case $choice in
"exit")
break
;;
"copy")
echo $answer | xclip -selection clipboard
break
;;
*)
answer=$(qalc $choice)
;;
esac
choice=$(echo -e "copy\nexit " | dmenu -p "$answer")
done