Skip to content

Instantly share code, notes, and snippets.

@draganczukp
Created January 27, 2019 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save draganczukp/9122fde6816c8b0308f3c00ddc347acb to your computer and use it in GitHub Desktop.
Save draganczukp/9122fde6816c8b0308f3c00ddc347acb to your computer and use it in GitHub Desktop.
#/bin/bash
# Get the first device listed by kdeconnect-cli
DEVICE=$(kdeconnect-cli --id-only -a | sed '1q')
# Which qdbus service
SERVICE="org.kde.kdeconnect"
# Path depends on device
QPATH="/modules/kdeconnect/devices/$DEVICE/share"
# What method will be called
METHOD="org.kde.kdeconnect.device.share.shareUrl"
URL=$1
# Sending the url
qdbus $SERVICE $QPATH $METHOD $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment