| 1 | |
| 2 | # emoji.sh — pick an emoji/symbol, copy it and type it into the focused window. |
| 3 | # The list lives in ~/.config/sway/scripts/emoji.txt — add your own lines. |
| 4 | source "$(dirname "$0")/_lib.sh" |
| 5 | list="$(dirname "$(readlink -f "$0")")/emoji.txt" |
| 6 | [[ -f $list ]] || { notify emoji dialog-error "Emoji list missing" "$list"; exit 1; } |
| 7 | |
| 8 | pick=$(menu "Emoji" --width 500 --height 400 < "$list") || exit 0 |
| 9 | char=${pick%% *} |
| 10 | printf '%s' "$char" | wl-copy |
| 11 | has wtype && wtype "$char" |
| 12 | notify emoji face-smile "Copied $char" |