kdeconnect.el is a package that provides helper functions for the excellent KDE Connect package available for computers and Android devices. Now you can send files across devices or make your phone ring when you can’t find the darn thing, all without ever leaving Emacs!
Install KDE Connect on your Android device(s) using F-Droid or the Google Play Store. Also install it on any computers you want. As of this writing, KDE Connect requires Linux, and is probably in your distro’s repos already. It does not require KDE. Pair your devices from these applications.
Install the Emacs package (available in MELPA) and add
(require 'kdeconnect) to your
You will need to add the IDs of any devices you wish to use.
If you don’t already know these, call
M-x kdeconnect-list-devices and check your
kdeconnect-devices in your
init.el to be the IDs of your device(s) separated by commas, like so:
(setq kdeconnect-devices "ef72819a8db1e193,ff172817910b1bc5,_2cd7dfcd_7260_22dd_6658_9aa2760b8275_")
Before calling any functions that interact with a specific device, you must set the active device, even if you only have one device ID in
There are two ways to do this.
You can set a default device by adding
(setq kdeconnect-active-device "<device ID>")
When you load Emacs and call a function like kdeconnect-ping, that device will be the target.
If you do not set a default or wish to update your active device for the session, call
After selecting an active device, the following functions are available.
|kdeconnect-get-active-device||Display the active device|
|kdeconnect-list-devices||Display all visible devices, even unavailable ones|
|kdeconnect-ping||Send a notification to the active device|
|kdeconnect-ping-msg||Send a notification with a custom message to the active device|
|kdeconnect-refresh||Scan the network and refresh any available connections|
|kdeconnect-ring||Make the active device ring (useful for finding it)|
|kdeconnect-select-active-device||Select the active device from |
|kdeconnect-send-file||Send the selected file to the active device|
|kdeconnect-send-sms||Send an SMS to the specified destination|
If you’re not seeing any response from your desired device, make sure there is an active connection.
You can invoke
M-x kdeconnect-refresh to scan the network and refresh and available connections to your devices.
You can use
M-x kdeconnect-list-devices or open up KDE Connect to make sure that your desired devices are actually available.