M river/init => river/init +4 -2
@@ 60,10 60,12 @@ riverctl map normal $mod+Shift bracketright spawn 'update-volume up'
riverctl map normal $mod+Shift bracketleft spawn 'update-volume down'
# Useful symbols
-riverctl map normal $mod N spawn digraph-menu
+riverctl map normal $mod N spawn 'digraph-menu type'
+riverctl map normal $mod+Shift N spawn 'digraph-menu copy'
# Emoji
-riverctl map normal $mod M spawn emoji-menu
+riverctl map normal $mod M spawn 'emoji-menu type'
+riverctl map normal $mod+Shift M spawn 'emoji-menu copy'
# Copy password
riverctl map normal $mod apostrophe spawn pass-menu
M => +7 -1
@@ 1,4 1,10 @@
#!/bin/sh
graph="$(vis-digraph | bemenu -p "digraph>" -l 30 | awk '{ print $2 }')"
wl-copy "$graph"
if [ "$1" = "copy" ]; then
wl-copy "$graph"
elif [ "$1" = "type" ]; then
wtype -- "$graph"
else
printf "Unsupported operation\n" >&2
fi
M => +8 -2
@@ 20,5 20,11 @@ grep -F "$choice" "$EMOJI_FILE"
emoji="$(printf "%s" "$choice" | awk '{ print $1 }')"
code="$(printf "%s" "$choice" | awk -F'; ' '{ print $2 }')"
wl-copy "$emoji"
wl-copy -p "$code"
if [ "$1" = "copy" ]; then
wl-copy "$emoji"
wl-copy -p "$code"
elif [ "$1" = "type" ]; then
wtype -- "$emoji"
else
printf "Unsupported operation\n" >&2
fi