Created
February 4, 2015 11:25
-
-
Save alexandresalome/4b70f2a4a1b8a7b2d61a to your computer and use it in GitHub Desktop.
Edit your clipboard
This file contains 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 -n" # 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