Created
October 8, 2016 05:31
-
-
Save shayne/a82c1ab03f77bab91c7b94112d97298f to your computer and use it in GitHub Desktop.
[fix] deepin-screenshot clipboard not working
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 | |
# REPLACE EXISTING FILE WITH THIS | |
# /usr/share/deepin-screenshot/src/gtk-clip | |
# source: http://unix.stackexchange.com/a/266761 | |
command -v xclip >/dev/null 2>&1 || { echo "Need command xclip. Aborting." >&2; exit 1; } | |
[[ -f "$1" ]] || { echo "Error: Not a file." >&2; exit 1; } | |
TYPE=$(file -b --mime-type "$1") | |
xclip -selection clipboard -t "$TYPE" < "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment