Dotfiles for different machines on different branches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
733 B

  1. #!/bin/sh
  2. # Give dmenu list of all unicode characters to copy.
  3. # Shows the selected character in dunst if running.
  4. # by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
  5. # Must have xclip installed to even show menu.
  6. xclip -h >/dev/null || exit
  7. if [ -e ~/.config/fontawesome ]; then
  8. chosen=$(grep -v "#" -h ~/.config/emoji ~/.config/fontawesome | dmenu -i -l 20 )
  9. else
  10. chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20 )
  11. fi
  12. [ "$chosen" != "" ] || exit
  13. c=$(echo "$chosen" | sed "s/ .*//")
  14. echo "$c" | tr -d '\n' | xclip -selection clipboard
  15. notify-send "'$c' copied to clipboard." &
  16. s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}')
  17. echo "$s" | tr -d '\n' | xclip
  18. notify-send "'$s' copied to primary." &