dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

rofiemoji (529B)


      1 #!/usr/bin/env bash
      2 
      3 # From Luke
      4 # The famous "get a menu of emojis to copy" script.
      5 
      6 # Must have xclip installed to even show menu.
      7 xclip -h >/dev/null || exit
      8 
      9 chosen=$(grep -v "#" "$DOTFILES"/misc/emoji | dmenu -i -l 20 -fn Monospace-18)
     10 
     11 [ "$chosen" != "" ] || exit
     12 
     13 c=$(echo "$chosen" | sed "s/ .*//")
     14 echo "$c" | tr -d '\n' | xclip -selection clipboard
     15 notify-send "'$c' copied to clipboard." &
     16 
     17 s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}')
     18 echo "$s" | tr -d '\n' | xclip
     19 notify-send "'$s' copied to primary." &