fogine / rofi-search

Interactive Google / DuckDuckGo search via rofi
MIT License
96 stars 7 forks source link

How do I use this? #6

Closed aadilayub closed 3 years ago

aadilayub commented 3 years ago

There are instructions for installing the package, but not for how to use it in conjuction with rofi

I tried running it in the terminal but just got this:

~
❯ rofi-search
{"prompt":"search","input action":"send"}

does rofi need to configured in a certain way to make use of this package?

fogine commented 3 years ago

There is whole usage section in the readme. Its not that simple as running rofi-search because of how rofi is designed. As stated in the readme, you can run it with following command, for example:

export GOOGLE_ARGS='["--count", 10]'
export ROFI_SEARCH='googler'

rofi -modi blocks -blocks-wrap /absolute/path/to/rofi-search -show blocks \ 
-lines 4 -eh 4 -kb-custom-1 'Control+y' -theme /path/to/your/theme.rasi 

If you want to use the theme which is used in the preview gif, you can get it here: https://github.com/fogine/dotfiles/blob/master/rofi/google_theme.css

otherwise you can create your own..

fogine commented 3 years ago

I'll probably add some fallback with default configuration so that users are not required to configure it by themselves.

fogine commented 3 years ago

Now you can run it just by executing rofi-search. See 918fd8f

aadilayub commented 3 years ago

@fogine Thank you for the explanation and for making it usable with a single command 🙏