You are not logged in.
Pages: 1
Topic closed
Since I switched from Windows a few years ago it always annoyed me that I couldn't type mathematical expressions in the search bar and get a result.
I looked in the settings menu and couldn't find any setting to enable it.
Also I duckduckgo'd a little bit and couldn't find any answer.
Offline
Are you only looking for a whisker menu solution? I've never used that launcher, but many others can certainly (be configured to) do this including dmenu, rofi, and interrobang.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I don't think whisker can do that seamlessly. It should be possible to define a search action that will call a bash script to calculate and then display the result in a message box / xosd / notification /...
Last edited by progandy (2020-10-12 22:20:23)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Or you can use the xfce4-calculator-plugin.
Online
You can add this Search Action in Whisker Menu Properties:
Name: Calculator
Pattern: ^([0-9]*[\/\+\-\*][0-9]*)*$
Command: sh -c 'python -c "print(eval(str(\0)))" | zenity --text-info --title="Result Calculator" --width=50 --height=5'
Regular Expression: OnLast edited by zebus3d (2022-08-25 11:40:49)
Offline
Thanks for the contribution, but this thread is two years old and the OP has not been back since February.
Closing.
Offline
Pages: 1
Topic closed