Open BoolmanO opened 3 months ago
I think the latter is the better option, because by implementing this, (depending on how its done) tofi
will be useful for things like getting user input and allow anyone to make a tool that uses it if so desired
This is how I implemented the calculator for myself. It uses tofi as the input and then just copies the result. I hope this can be of use for someone:
# Input operation
operation=$(echo "" | tofi --prompt-text="Math Operation: " --require-match=false)
# Calculate the result
result=$(echo "$operation" | bc -l)
# Copy the result to the clipboard
echo "$result" | wl-copy
notify-send "Result: $result" "The result has been copied to the clipboard."
like, how didn't i think of this before?
anyways, thanks for the tip
I think it can be very helpful in some situations, so, maybe add some sort of option for calculator mode? If you don't want this, maybe add mode when tofi can accept output from some script or smth like that?