blob: 090e8e36f70a0f00a5c2bd46d9b3f2898120ef7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
chosen=$(dmenu -i -l 20 < ~/.local/share/emoji | sed "s/ .*//")
[ "$chosen" != "" ] || exit
# If you run this command with an argument, it will automatically insert the character.
echo "$chosen" | xclip -selection clipboard
if [ -n "$1" ]; then
WINDOW=$(xdotool getactivewindow getwindowname)
if [[ "$WINDOW" =~ .*"$SUB".* ]]; then
xdotool key "ctrl+v"
else
xdotool key Shift+Insert
fi
# xdotool type --delay 1 $chosen
# VAR=$(xclip -o)
# xdotool type $chosen
else
notify-send "'$chosen' copied to clipboard." &
fi
|