Skip to content

Commit

Permalink
Introduce delay to xdotool
Browse files Browse the repository at this point in the history
A lot of times rofimoji couldn't type the emoji, but copy-pasting did
work. After some manual trial-and-error (😑) it seems that the problem
was the immediacy of xdotool. If we set the delay to imperceptible
100ms, it works - even in Firefox! 🦄
  • Loading branch information
fdw committed Dec 29, 2018
1 parent 566016d commit 45fa065
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rofimoji.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import time

from subprocess import Popen, PIPE

Expand Down Expand Up @@ -1719,6 +1720,7 @@ def select_skin_tone(selected_emoji: chr):
emoji = emoji + select_skin_tone(emoji)

if rofi.returncode == 0:
time.sleep(0.1)
Popen(
args=[
'xdotool',
Expand Down

0 comments on commit 45fa065

Please sign in to comment.