Translations:KDE Connect/Tutorials/Useful commands/15/en

From KDE UserBase Wiki
  • Save locally:
    spectacle -b
  • Send to phone:
    file=/tmp/$(hostname)_$(date "+%Y%m%d_%H%M%S").png; spectacle -bo "${file}" && while ! [ -f "${file}" ]; do sleep 0.5; done && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share "${file}"
  • Save webcam photo in the Images folder and send to phone:
    file="$HOME/Images/WebcamImage_$(date "+%Y%m%d_%H%M%S").jpg"; ffmpeg -f video4linux2 -s 1280x720 -i /dev/video0 -ss 0:0:2 -frames 1 "${file}" && kdeconnect-cli -d $(kdeconnect-cli -a --id-only) --share "${file}"