Skip to content

jeremija/unipicker

Repository files navigation

unipicker

A CLI utility for searching unicode characters by description and optionally copying them to clipboard.

Screenshots

Running with fzf:

Running with fzf

Running with rofi -dmenu:

Running with rofi

Dependencies

You need a selector command, default is fzf

To copy to clipboard on Linux you need xclip

xclip can be installed in various linux distros:

  • Ubuntu/Debian: apt-get install xclip
  • Arch Linux: pacman -S xclip

The pbcopy utility will be used on a Mac, which is installed by default.

Installation

make install

To install to your home directory instead of /usr/local:

make install PREFIX=$HOME/.local

Alternatively, if you're using Nix:

nix-env -iA nixpkgs.unipicker

Usage

Select unicode character by description

Usage: unipicker [--command cmd] [--copy-command cmd ] [--copy] [--list]

Arguments:
  --command       Overrides default select command
  --copy-command  Override copy to clipboard command, implies --copy
  --copy          Copy to clipboard
  --list          Only list the symbols, do not select or copy

Variables:

  UNIPICKER_SELECT_COMMAND  Command to use for selecting (= fzf)
  UNIPICKER_COPY_COMMAND    Command to use for copying (= pbcopy)
  UNIPICKER_SYMBOLS_FILE    Location of symbols (= /usr/local/share/unipicker/symbols)

Configuration

You can configure both the selector command and the copy command. There are two main configuration files which are sourced by unipicker:

  • /etc/unipickerrc
  • ${HOME}/.unipickerrc

The default settings can be seen in the unipickerrc file. The default copy command will be determined based on the OS, but it can be overridden.

The command line arguments can be used to override the variables set.

Examples

Using rofi instead of fzf:

unipicker --command "rofi -dmenu"

Using a different clipboard command

unipicker --copy-command pbcopy

License

MIT

About

Search unicode characters in console and copy to clipboard

Resources

License

Stars

Watchers

Forks

Packages

No packages published