Check if DISPLAY var is set for clipboard

This commit is contained in:
Ceda EI 2019-05-12 16:47:42 +05:30
parent 1eefff0638
commit 7f19a6cf82
1 changed files with 6 additions and 2 deletions

View File

@ -23,5 +23,9 @@ if [[ $HASTEBIN == 1 ]]; then
else else
link=$(echo $op | cut -f2 -d'/') link=$(echo $op | cut -f2 -d'/')
fi fi
echo ${MKR_BIN}${link} | tee /dev/tty | xclip -selection clipboard if [[ -v DISPLAY ]]; then
xdg-open ${MKR_BIN}${link} echo ${MKR_BIN}${link} | tee /dev/tty | xclip -selection clipboard
xdg-open ${MKR_BIN}${link}
else
echo ${MKR_BIN}${link}
fi