-
Notifications
You must be signed in to change notification settings - Fork 0
/
d-unicodes
executable file
·29 lines (20 loc) · 742 Bytes
/
d-unicodes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# Script to Insert and copy the unicode char
source d-var.conf
# The famous "get a menu of emojis to copy" script.
# You can the icons for this script in icons/ directory here
chosen=$(bat ~/d-git/d-bin/treasure/unicodes/* | $UNI_MENU -i -p ' ' | awk '{print $1}' )
# Exit if none chosen.
[ -z "$chosen" ] && exit
# If you run this command with an argument, it will automatically insert the
# character. Otherwise, show a message that the emoji has been copied.
if [ -n "$1" ]; then
wtype "$chosen"
else
# replace with xclip or xsel or x11
printf "$chosen" | wl-copy
# Replace with xdotool for X11
wtype "$chosen"
# not required tho
# notify-send "'$chosen' copied to clipboard." &
fi