Created
January 27, 2019 12:34
-
-
Save draganczukp/9122fde6816c8b0308f3c00ddc347acb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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