calc migration

This commit is contained in:
2025-10-26 00:39:16 +00:00
parent ee9d27147e
commit 6d5bb72149

View File

@@ -3,13 +3,13 @@
shift
query="$1"
if [ -z "$query" ]; then
query="$(echo "tui" | bemenu --prompt "qalc")"
query="$(echo "tui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
fi
if [ "$query" = "tui" ]; then
exec alacritty msg create-window --class="term_float" --working-directory="$HOME" --command "qalc"
elif [ -n "$query" ]; then
qalc_res="$(qalc --terse "$query")"
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")"
menu_res="$(echo -e "$qalc_res\ntui" | ~/.local/bin/menu/horizontal.sh -p "qalc")"
if [ "$qalc_res" = "$menu_res" ]; then
wl-copy "$qalc_res"
notify-send "$qalc_res" -a calc "Result copied to clipboard"