aboutsummaryrefslogtreecommitdiff
path: root/.scripts/emoji
blob: 2d2279661864e9d80a3867ce709e407e01c4b6ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

window=$(xdotool getactivewindow)

set -- junk "$(cut -d '|' -f 1 ~/.config/emoji | dmenu -p emoji)"

shift

if [ $# -eq 0 ]; then
	exit
fi

emoji=$(grep "^$(echo $@)|" ~/.config/emoji | cut -d '|' -f 2 | tr -s '\r')

#echo "$emoji" | xclip -selection clipboard
xdotool type --window "$window" "$emoji"

xdotool windowactivate "$window"