svenstaro / rofi-calc

🖩 Do live calculations in rofi!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] How to see results live while typing

idr4n opened this issue · comments

Hi,

Sorry if this might be a stupid question. I haven't been able to to see the results live while typing (in the same way that is shown in the README repo page). I tried switching to different rofi themes but that didn't make a difference.

Is there anything I'm missing?

It should just work. Can you try starting in the terminal and see whether there are any errors?

Yes, it does work now, my mistake. I had some hidden bug in my rofi config. Sorry about that!

@ivanddm can you tell us how do you fix it.

@kmehtab I don't remember what was causing the problem in my config exactly as I'm not using Linux anymore at the moment. However, this is the config I was using at the end and it was working just fine:

theme="dmenu"

dir="$HOME/.config/rofi/launcher"

rofi -lines 10 -show calc -modi calc \
     -theme $dir/"$theme" -show-icons -drun-icon-theme "candy-icons" \
     -calc-command "echo -n '{result}' | xclip -selection clipboard" \
     -theme-str '#window { anchor: north; location: north; height: 0; }'

Hope that helps!

To future ticket viewers, make sure your rofi theme has the message box included, some of them hide it for some reason.

To future ticket viewers, make sure your rofi theme has the message box included, some of them hide it for some reason.

This solved it for me. Just go to the config file of your theme and look for the keyword children. The one in mainbox should contain something like: [ "listview" ...], add "message" to that array and you're good.
image

If anyone would like to put a heads-up into the README about this, I'm certainly happy to accept that. :)