Skip to content

Instantly share code, notes, and snippets.

@shayne
Created October 8, 2016 05:31
Show Gist options
  • Save shayne/a82c1ab03f77bab91c7b94112d97298f to your computer and use it in GitHub Desktop.
Save shayne/a82c1ab03f77bab91c7b94112d97298f to your computer and use it in GitHub Desktop.
[fix] deepin-screenshot clipboard not working
#!/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