Created
December 7, 2014 21:43
-
-
Save alexandresalome/1460a7215e2528cc8d12 to your computer and use it in GitHub Desktop.
clipboard-editor
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 | |
# | |
# Clipboard Editor - edit your clipboard in your favorite editor | |
set -e | |
# xclip command to execute | |
XCLIP_COMMAND="xclip -sel clipboard" # works on Xubuntu | |
# editor to use | |
EDITOR="subl -w" # sublime text | |
TMP_FILE="/tmp/clipboard-editor" | |
$XCLIP_COMMAND -o > "$TMP_FILE" | |
$EDITOR "$TMP_FILE" | |
$XCLIP_COMMAND -i "$TMP_FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment