15 lines
524 B
Bash
Executable file
15 lines
524 B
Bash
Executable file
#!/bin/sh
|
|
|
|
dbfile=$HOME/.local/share/kaomoji/table
|
|
|
|
category=$(grep -v "^$" "$dbfile" | sed 's/: .*//' | uniq | bemenu -l 41 -i -p "Choose category: ")
|
|
|
|
if [ "$category" = "Other special" ]; then
|
|
output=$(grep "^$category: " "$dbfile" | sed "s/^$category: //" | bemenu -l 30 -i -p "Choose kaomoji: " | sed 's/^.*: //')
|
|
else
|
|
output=$(grep "^$category: " "$dbfile" | sed "s/^$category: //" | bemenu -l 30 -i -p "Choose kaomoji: ")
|
|
fi
|
|
|
|
wl-copy "$output"
|
|
|
|
pgrep -x mako >/dev/null && notify-send "$output copied to clipboard"
|