dot_testing/builds/utils/start-phone-bridge

22 lines
622 B
Plaintext
Raw Normal View History

2024-05-12 13:23:59 -05:00
ssh phone "
termux-notification -c 'a computer connected via the termux bridge';
while true; do
termux-sms-list -d -t inbox | \
jq -r 'map(select(.read == false)).[] | if .sender == null then .number else .sender end, .body' | \
xargs -d '\n' -n2
done
" 2>&1 | awk '!seen[$0]++' | tee help_me_im_going_insane | xargs -L1 dunstify
ssh phone "
# ( while true; do
# echo "911
#testing message"
#done ) | {
#( while true; do
# ssh phone "termux-sms-list -d -t inbox" \
# | jq -r 'map(select(.read == false)) | if .[].sender == null then .[].number else .[].sender end, .[].body'
#done ) | {
# paste -d ' ' - -
#}