Git Product home page Git Product logo

rofi-fontawesome's Introduction

example

Font Awesome icon list for Rofi

I generated this Font Awesome icon lists to be used as a quick search/select tool utilizing rofi, xclip and xdotool.

There are 3 lists available:

  • Default for pasting the icon class
  • Unicode for pasting the unicode
  • f5-icon-list.txt same as Default, but updated for Font Awesome 5 Free and without colors.

Requirements

  • Obviously you will need Rofi.
  • The actual Font Awesome font
  • A CLI clipboard utility like xclip, xsel or pbpaste.
  • xdotool (or another tool to simulate keyboard input and mouse activity)

Examples

Simple

curl -s https://raw.githubusercontent.com/wstam88/rofi-fontawesome/master/icon-list.txt | rofi -dmenu -i -markup-rows -p "" -columns 6 -width 100 -location 1 -lines 20 -bw 2 -yoffset -2 | cut -d\' -f2

Quick and dirty

echo -n "<i class='fa fa-$(curl -s https://raw.githubusercontent.com/wstam88/rofi-fontawesome/master/icon-list.txt | rofi -dmenu -i -markup-rows -p "" -columns 6 -width 100 -location 1 -lines 20 -bw 2 -yoffset -2 | cut -d\' -f2 )'></i>" | xclip -selection clipboard && xdotool key ctrl+shift+v

Add icon to clipboard (f5-icon-list)

options='-columns 6 -width 100 -lines 20 -bw 2 -yoffset -2 -location 1'

selected=$(\
  cat f5-icon-list.txt \
    | rofi -dmenu -i -markup-rows \
    ${options}
    -p "Select icon: ")

# exit if nothing is selected
[[ -z $selected ]] && exit

echo -ne $(echo "$selected" |\
  awk -F';' -v RS='>' '
    NR==2{sub("&#x","",$1);print "\\u" $1;exit}'
) |  xclip -selection clipboard

Use shell script (recommended)

Compose your own shell script and do as you like.

Use fontawesome-menu script

rofi-fontawesome's People

Contributors

wstam88 avatar budrich avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.