dotfiles

My dotfiles used for LARBS
Log | Files | Refs | README | LICENSE

dmenuunicode (519B)


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