浏览代码

Introduce delay to xdotool

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! 🦄
tags/2.0.0
Fabian Winter 1年前
父节点
当前提交
45fa065b3c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      rofimoji.py

+ 2
- 0
rofimoji.py 查看文件

@@ -1,5 +1,6 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import time

from subprocess import Popen, PIPE

@@ -1719,6 +1720,7 @@ else:
emoji = emoji + select_skin_tone(emoji)

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

正在加载...
取消
保存