System-wide character-picker: emoji and unicode shell extensions for rofi
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.

rofiemoji.sh 384B

123456789101112131415161718192021
  1. #!/bin/sh
  2. VER='11.0'
  3. URL="https://www.unicode.org/Public/emoji/${VER}/emoji-test.txt"
  4. DIR="$HOME/.cache"
  5. FILE="$DIR/emojis.txt"
  6. if [ ! -r $FILE ]
  7. then
  8. if [ ! -d $DIR ]; then mkdir $DIR; fi
  9. curl $URL | grep -v '^#' | grep ' ; fully-qualified ' | cut -d'#' -f2 > $FILE
  10. fi
  11. if [ "$@" ]
  12. then
  13. smiley=$(echo $@ | cut -d' ' -f1)
  14. echo -n "$smiley" | xsel -bi
  15. exit 0
  16. fi
  17. cat $FILE