Multiple scripts that are useful but don't deserve their own repository.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
multiple_scripts/ss_to_clipboards.sh

20 lines
596 B

#!/bin/bash
##############################################################################
#
# to_clipboards
# By Steven Saus
# (c) 2020; licensed under the MIT license
if [ "$#" -gt 0 ]; then
# concatenated arguments fed via a pipe.
MyData=$(printf %s "${@}")
else
MyData=$(</dev/stdin)
fi
echo "${MyData}" | xclip -i -selection primary -r
echo "${MyData}" | xclip -i -selection secondary -r
echo "${MyData}" | xclip -i -selection clipboard -r
echo "${MyData}" | tr -d '/n' | /usr/bin/copyq write 0 -
/usr/bin/copyq select 0