This commit is contained in:
Yuri Zamyatin 2025-01-11 23:52:30 +00:00
parent f0f4766a26
commit 89fad4e748

View File

@ -116,10 +116,11 @@ exec_calc() {
if [ "$query" = "tui" ]; then
exec_float_tui "qalc"
elif [ -n "$query" ]; then
calc_res="$(qalc --terse "$query")"
menu_res="$(echo -e "$calc_res\ntui" | bemenu --prompt "qalc")"
if [ "$calc_res" = "$menu_res" ]; then
notify-send "$calc_res" -a calc "Result copied to clipboard" -t 3000
qalc_res="$(qalc --terse "$query")"
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")"
if [ "$qalc_res" = "$menu_res" ]; then
wl-copy "$qalc_res"
notify-send "$qalc_res" -a calc "Result copied to clipboard" -t 3000
elif [ -n "$menu_res" ]; then
exec_calc _ "$menu_res"
fi