scripts

random assortment of scripts
git clone git://git.andersuno.nu/scripts.git
Log | Files | Refs

emojimenu.sh (571B)


      1 #!/bin/sh
      2 # Give dmenu list of all unicode characters to copy.
      3 # Shows the selected character in dunst if running.
      4 
      5 # Must have xclip installed to even show menu.
      6 #xclip -h >/dev/null || exit
      7 
      8 chosen=$(grep -v "#" ~/Scripts/emojilist.txt | 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." -u low &
     15 
     16 s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}')
     17 echo "$s" | tr -d '\n' | xclip
     18 notify-send $s "copied to primary." -u low &