You are not logged in.

#1 2020-10-12 21:53:29

BenniTec
Member
Registered: 2020-09-11
Posts: 24

Xfce: Is there a way to do math on the whisker menu?

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

#2 2020-10-12 22:09:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,496
Website

Re: Xfce: Is there a way to do math on the whisker menu?

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

#3 2020-10-12 22:20:09

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Xfce: Is there a way to do math on the whisker menu?

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

#4 2020-10-13 01:19:31

toz
Member
Registered: 2011-10-28
Posts: 513

Re: Xfce: Is there a way to do math on the whisker menu?

Or you can use the xfce4-calculator-plugin.

Offline

#5 2022-08-25 11:29:24

zebus3d
Member
Registered: 2022-08-25
Posts: 1

Re: Xfce: Is there a way to do math on the whisker menu?

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: On

Last edited by zebus3d (2022-08-25 11:40:49)

Offline

#6 2022-08-25 11:50:18

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Xfce: Is there a way to do math on the whisker menu?

Thanks for the contribution, but this thread is two years old and the OP has not been back since February.

Closing.

Offline

Board footer

Powered by FluxBB