#!/bin/bash # set up to work with https://github.com/Aptivi-Analytics/KaomojiList.git KAO_FILE="$HOME/stuff/manual-programs/KaomojiList/kaomojis.json" choices=$(jq '.[]|.categories|.[]|.name' "$KAO_FILE" | sed 's/"//g') choice=$(echo "$choices" | sed /^$/d | rofi -dmenu "$prompt_message") emojlist=$(jq --arg sel "$choice" '..| select(.name==$sel)? | .emoticons | .[]' "$KAO_FILE") emoj=$(echo "$emojlist" | sed /^$/d | rofi -dmenu "$prompt_message") if [ "$WAYLAND_DISPLAY" ]; then echo "$emoj" | wl-copy else echo "$emoj" | xclip -sel clip fi