fogine / rofi-search Goto Github PK
View Code? Open in Web Editor NEWInteractive Google / DuckDuckGo search via rofi
License: MIT License
Interactive Google / DuckDuckGo search via rofi
License: MIT License
Okay i followed your usage guide and set ROFI_SEARCH to ddgr.
When i start rofi-search it displays:
{"prompt":"search","input action":"send"}
and waits for input but doesn't open the search gui.
When i type something into the commandline and hit enter this error pops up (e.g. "a"):
undefined:1
a
^
SyntaxError: Unexpected token a in JSON at position 0
at JSON.parse (<anonymous>)
at ReadStream.<anonymous> (/usr/lib/node_modules/rofi-search/rofi-search:80:36)
at Array.forEach (<anonymous>)
at ReadStream.<anonymous> (/usr/lib/node_modules/rofi-search/rofi-search:78:22)
at ReadStream.emit (node:events:527:28)
at emitReadable_ (node:internal/streams/readable:601:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v17.7.2
Okay after that i tried it without the environment variable set but no googler installed.
Then the GUI opens and when i type something in it, it immediately crashes and shows this error:
Can not find "googler" executable.
BlocksMode-Message: 18:57:03.494: Child 257334 exited abnormally
Which makes sense because googler isn't installed. But shouldn't there be a fallback if googler is not installed to use ddgr?
I'm using endeavouros with i3-gaps. I use the linux-zen kernel.
I installed it using AUR but the rofi-blocks-git PKGBUILD file was faulty. So i installed rofi-blocks via makepkg -si
and an edited version of the PKGBUILD file. More information on that in the AUR Package comments for rofi-blocks-git.
Greetings,
For what I could find, rofi-search
spawns internally rofi
which makes it incompatible with the provided examples.
$ rofi -modi blocks -blocks-wrap rofi-search -show blocks
(process:773472): Helper-WARNING **: 00:15:00.469: Failed to set lock on pidfile: Rofi already running?
(process:773472): Helper-WARNING **: 00:15:00.469: Got error: -1 Socket operation on non-socket
BlocksMode-Message: 00:15:00.474: Child 773464 exited normally
Is there a solution for that? If rofi-search
spawns rofi
internally, it would be nice to be able to pass arguments to rofi
. Otherwise rofi
should not be launched internally.
For whatever reason when I use this the output comes through fairly garbled.
This is what it looks like. https://imgur.com/5NIG007
This is the command I'm using.
rofi -modi blocks -blocks-wrap /usr/bin/rofi-search -show blocks \
-lines 4 -eh 4 -kb-custom-1 'Control+y' -theme /usr/share/rofi/themes/glue_pro_blue.rasi
I'm guessing that it's either a font problem or I'm missing a dependency. I'm not sure which is most likely. I installed through the AUR.
Rofi's message box for reporting 'search time' is only displaying:
about <unavailable> results (<unavailable> seconds)
Not a big deal, just figured I would report it while I am here. I do wonder if its something with my environment but have yet to figure it out.
EDIT: Read over this my first time through doc:
(ddgr, googler) ...does not parse information about number of search results so this information is not currently available when using this method
Assuming that why, issue can be closed...sorry.
Just a quick FYI: I made a AUR package: https://aur.archlinux.org/packages/rofi-search-git/
More than happy to turn over maintainership if you wish :-)
number one on my wtf list is this:
#!/bin/sh
':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
console.log('Hello world');
I understand this part: $(command -v nodejs || command -v node)" "$0" "$@"
but the part I'm not entirely understanding is ':' //;
:
':'
i get that this is just a string so bash does nothing with it?// ;
???? lmao wut?this lead me to be think about the experience editing this file:
.sh
, orThere's no automatic correct syntax highlighting (whole file is considered bash so shellcheck screams about everything)
So the second question is did you try this instead:
#!/usr/bin/env node
(now the js file will execute with nodejs)My only assumption is that you're trying to account for ubuntu users that incorrectly have nodejs installed via apt as nodejs.
Hi,
I installed your patched rofi-blocks
and dropped rofi-search
in my $PATH
.
rofi command:
rofi -modi blocks -blocks-wrap /usr/local/bin/rofi-search -show blocks -lines 4 -eh 4 -kb-custom-1 'Control+y' -theme /home/clu/.config/rofi/brotab.rasi
Steps to reproduce
What behavior you see
Rofi exits with message:
[ERROR] string index out of range
BlocksMode-Message: 15:17:03.012: Child 309732 exited abnormally
What behavior you expect to see
I am unsure if this is expected behavior or perhaps a limitation of the implementation. If I clear the current query string, and quickly type another query a crash can be avoided.
Thanks for sharing this tool. It's impressive what can be accomplished with rofi, and rofi-search is making me rethink some of my own scripts, haha.
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?
I use a "work profile" and a "personal profile" and I might want to open a search result in either.
Also, a custom browser command could be used to launch an Incognito search.
The custom browser command may contain spaces, as itself might include options passed to a browser binary.
not able to open search results in the browser. I have added -kb-accept-entry but nothing happens I am able to copy the URL by pressing control+y.
Hello,
Thanks for this great piece of software.
But I fail to map it to a hotkey in xfce4.
How would I go about this ? I'd like to use ddgr.
rofu itself works great and all needed dependencies are installed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.