This document provides platform specific installation guidelines and help.
SelSearch requires Python>=3.8 to be installed.
In a terminal / anaconda prompt, latest version of SelSearch can be obtained via pip:
pip install selsearch
Verify your installation with selsearch -v
.
Optionally, you can generate a config file with:
selsearch init
Using XSel had two major benefits over the default way:
- it can grab selected text from a non-focused window;
- and it does not alter the clipboard (i.e., without XSel, SelSearch uses the clipboard to copy the selected text).
By default, Selsearch will use XSel if installed. You can opt-out of this by editing the config file:
xsel = false # We don't want to use XSel
As most Linux distrubutions use X, it is recommended to install XSel.
As MacOS distrubutions (can) use X, it is recommended to install XSel.
No installation issue known until now.
Many thanks to mmakdis for providing help and screenshots for the MacOS version.
You need to allow your terminal to use your keyboard.
First, open System Preferences, and search for Security & Privacy.
Then, in Accessibility, allow the Terminal application to control your computer.
Repeat the same process for Input Monitoring.
In a terminal, or in your .bashrc
(or equivalent), write export DISPLAY=:1
.
Verify that it works by testing the command xsel
.
If this does fix the problem, disable XSel in the config file and open an issue.
It seems that the <alt>
key is mapped to <option>
on MacOS keyboards.
Most probably, when you installed SelSearch, a warning told you that Path\To\Python\Scripts\
was not in PATH
.
This means that the selsearch
command is not directly exposed to you in the terminal.
To solve this, you must add the path to Python's scripts folder in the environment variable PATH
. See this tutorial for more details.