From 442634d440a1f50e32f36a0f885066b4b5f476ad Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Wed, 14 Nov 2018 00:56:16 +0530 Subject: [PATCH] Copy to clipboard also --- README.md | 3 ++- kaomoji.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a6c7d8..cc566ae 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # Kaomoji Rofi -Rofi script for typing kaomojis. +Rofi script for typing kaomojis. Types kaomojis and copies them into your clipboard. ![Kaomoji Rofi Preview](ss.png) ## Requirements + `rofi` + `xdotool` ++ `xclip` ## Installation diff --git a/kaomoji.sh b/kaomoji.sh index ed25656..6fbb628 100755 --- a/kaomoji.sh +++ b/kaomoji.sh @@ -2,4 +2,5 @@ selection=$(rofi -i -dmenu $@ < $(dirname $0)/kaomoji.txt) kaomoji=$(echo $selection | sed "s|$(echo -e "\ufeff").*||") -xdotool type --clearmodifiers "$kaomoji" +echo -n "$kaomoji" | xclip -selection clipboard +xdotool key --clearmodifiers ctrl+v