Skip to content

Comments

Added command line searching#230

Open
Tmarinus wants to merge 1 commit intohugolabe:masterfrom
Tmarinus:command_line_search
Open

Added command line searching#230
Tmarinus wants to merge 1 commit intohugolabe:masterfrom
Tmarinus:command_line_search

Conversation

@Tmarinus
Copy link

@Tmarinus Tmarinus commented Nov 6, 2025

Code probably needs a bit of cleanup. I do a none async call to wikipedia search to get the first result. This is probably not ideal, however it is just 1 query so maybe it is acceptable.
However for me this is working, allowing me to add commands like:

/usr/bin/flatpak run --command=wike com.github.hugolabe.Wike -s television

My final use is a bash script that searches wikipedia for the selected text. Which I can invoke from gnome keyboard shortcut:

#!/bin/bash
query=$(xclip -o -selection primary)
if [ -n "$query" ]; then
	/usr/bin/flatpak run --command=wike com.github.hugolabe.Wike -s "$query" > /dev/null 2>&1 &
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant