dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

dmenuunicode (711B)


      1 #!/usr/bin/env 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 if [ -e ~/.config/fontawesome ]; then
      9     chosen=$(grep -v "#" -h ~/.config/emoji ~/.config/fontawesome | dmenu -i -l 20 -fn Monospace-18)
     10 else
     11     chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20 -fn Monospace-18)
     12 fi
     13 
     14 [ "$chosen" != "" ] || exit
     15 
     16 c=$(echo "$chosen" | sed "s/ .*//")
     17 echo "$c" | tr -d '\n' | xclip -selection clipboard
     18 notify-send "'$c' copied to clipboard." &
     19 
     20 s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}')
     21 echo "$s" | tr -d '\n' | xclip
     22 notify-send "'$s' copied to primary." &