Skip to content

About

A simple rofi-based picker for nerd font icons. Browse through thousands of icons with fuzzy search and copy them to your clipboard.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Nerd Font Rofi Picker

A rofi-based picker for Nerd Font icons. Browse thousands of icons, filter them, and copy the selected value as a glyph, name, hex code, or CSS class.

Features

  • Fuzzy search: find icons by name or category.
  • Format selection: copy as glyph, class name, hex code, or CSS.
  • Pre-filtered pickers: pass a query to open rofi with an existing filter, for example math or arrow.
  • Composable output: --stdout prints the selection without touching the clipboard.
  • Standalone: auto-downloads icon data when the repository submodule is missing.
  • Weekly updates: refreshes icon data automatically.

Installation

User install

git clone --recurse-submodules https://github.com/aaronedev/nerdfont-icon-rofi-picker.git
cd nerdfont-icon-rofi-picker
./install.sh

The default install creates:

Path Contents
~/.local/bin/nerd-rofi-picker Executable
~/.local/share/nerd-rofi-picker/ Icon data and rofi theme
~/.local/share/bash-completion/completions/ Bash completion
~/.local/share/zsh/site-functions/ Zsh completion
~/.config/fish/completions/ Fish completion

Ensure ~/.local/bin is in PATH. If Zsh completion is not picked up, add ~/.local/share/zsh/site-functions to fpath before compinit.

Install under another prefix:

sudo ./install.sh --prefix /usr/local

Standalone

Download nerd_rofi_picker.sh, make it executable, and run it. The script downloads icon data on first use and stores it under ${XDG_DATA_HOME:-~/.local/share}/nerd-rofi-picker/.

Usage

nerd-rofi-picker
nerd-rofi-picker --query math
nerd-rofi-picker --query 'math;' --mode name
nerd-rofi-picker --mode hex --stdout

A positional argument is equivalent to --query:

nerd-rofi-picker 'math;'

A leading or trailing semicolon is ignored, so launcher triggers such as math; can be passed directly.

Options

Option Description
-q, --query TEXT Pre-fill the rofi search filter.
-m, --mode MODE Value copied on Enter: glyph (default), name, hex, or css.
-u, --update Force an icon-data update before opening the picker.
--stdout Print the selected value to stdout instead of copying it.
-h, --help Show help.
-V, --version Show the version.

Keybindings

Key Action
Enter Copy the configured mode (glyph by default).
Alt + n Copy the name (for example nf-fa-home).
Alt + h Copy the hex code (for example f015).
Alt + c Copy the CSS class (for example .nf-fa-home).
Left / Right Navigate columns.
Ctrl + b / f Move the cursor in the search bar.

Window-manager binds

Hyprland examples:

bind = SUPER, M, exec, nerd-rofi-picker --query math
bind = SUPER, E, exec, nerd-rofi-picker
bind = SUPER, semicolon, exec, nerd-rofi-picker --query math

The same command works from any launcher that executes shell commands. If the compositor does not inherit ~/.local/bin in its PATH, use the absolute path to the executable in the bind.

Requirements

  • rofi
  • awk, paste, and python3
  • wl-copy (Wayland) or xclip (X11)
  • curl or wget for automatic data downloads
  • A Nerd Font installed on the system

Development

./tests/smoke.sh

The smoke test exercises the CLI with a stubbed rofi, checks the installed layout, and verifies the Bash, Zsh, and Fish completions. It requires bash, python3, zsh, and fish.

About

A simple rofi-based picker for nerd font icons. Browse through thousands of icons with fuzzy search and copy them to your clipboard.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages