Created
March 17, 2016 05:34
-
-
Save kylescottmcgill/94af548623ee2e150086 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function yap_yank { | |
| focused=$(xdotool getwindowfocus getwindowname) | |
| if [[$focused == "termite"]]; | |
| then | |
| xdotool key ctrl+shift+c | |
| else | |
| xdotool key ctrl+c | |
| fi | |
| exit | |
| } | |
| function yap_paste { | |
| focused=$(xdotool getwindowfocus getwindowname) | |
| if [[$focused == "termite"]]; | |
| then | |
| xdotool key ctrl+shift+v | |
| else | |
| xdotool key ctrl+v | |
| fi | |
| exit | |
| } | |
| case "$1" in | |
| "yank") yap_yank ;; | |
| "paste") yap_paste ;; | |
| *) exit;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment