Announcement

Collapse
No announcement yet.

A rofi-based picker for selected unicode characters or emojis

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    A rofi-based picker for selected unicode characters or emojis

    Requires xclip and xdotool in addition to rofi.

    Code:
    #!/bin/bash
    
    options='-columns 6 -width 100 -lines 20 -location 1'
    
    selected=$( < $HOME/Desktop/my-special-chars.txt rofi -dmenu -i -markup-rows -columns 6 -width 100 -lines 20 -location 1 -p "Select item: " )
    
    [[ -z $selected ]] && exit
    
    echo -ne $(echo "$selected" | awk ' { print $1 } ')\
    | xclip -selection clipboard
    sleep 0.1
    xdotool key shift+Insert
    
    exit 0
    Current contents of $HOME/Desktop/my-special-chars.txt (I don't use emojis much.)

    Code:
    ✔	right          237B
    ✘	wrong          2718
    ₹	rupee          20B9
    »	greater        00BB
    «	less           00AB
    …	ellipsis       2026
    ™	trademark      2122
    ©	copyright      00A9
    ®	registered     00AE
    °	degree         00B0
    •	big-dot        2022
    ⚙	cog wheel/gear 2699
    😃	smile          1F603
    😉	wink           1F609
    😔	sad            1F614
    ☰	hamburger      2630
    —	em-dash        2014
    ①	circle-1       2460
    ②	circle-2       2461
    ③	circle-3       2462
    ¹	super-1        00B9
    ²	super-2        00B2
    ³	super-3        00B3
    ⁴	super-4        2074
    ⁵	super-5        2075
    ⁶	super-6        2076
    ⁷	super-7        2077
    ⁸	super-8        2078
    ⁹	super-9        2079
    ±	plus/minus     00B1
    µ	mu             03BC
    α	alpha          03B1
    β	beta           03B2
    λ	lambda         03BB
    ¶	pilcrow        00B6
    Δ	delta-cap      0394
    Σ	sigma-cap      03A3
    And this is what it looks like:
    Click image for larger version

Name:	20200526103300.png
Views:	1
Size:	79.0 KB
ID:	649645

    You can type or click on an item. Pressing Enter pastes the selected unicode character or emoji into your text field in Kate, LibreOffice, and Firefox.
    Kubuntu 20.04

    #2
    Nice

    I use to paste on Text editor and paste wherever needed. Or use EmojiCopy when internet is ON.

    Comment

    Working...
    X