diff --git a/arch-user/bin/run.sh b/arch-user/bin/run.sh index 1fad0a1..70a252f 100755 --- a/arch-user/bin/run.sh +++ b/arch-user/bin/run.sh @@ -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