| Post Reply | RetroFed Forum Forum Index » swaywm |
| Author | Message | ||
|---|---|---|---|
ExtremeDullard
lemmy.sdf.org
ExtremeDullard@lemmy.sdf.orgJoined: 2023-07-23 |
KDE Connect is a fantastic tool to integrate your cellphone with your desktop. But while it generally works well, it has a few issues in Sway. Here's a quick overview of how to make it work correctly. First of all, you need to start the KDE Connect daemon when the session opens. No biggie, it's just a regular config line:
The KDE Connect runs silently in the background. You can tell if it's working properly by trying to list devices it sees around on the network:
Then you want to run the KDE Connect indicator in the system tray. You can try to run the KDE Connect-supplied indicator program from the Sway config file by adding this line after starting the daemon:
If it works for you, great! You're done with that. Unfortunately, I find that it doesn't play so nicely with Waybar. It works 75% of the time, but it regularly fails to show up in my system tray - as in, it runs okay, but the icon is missing, which kind of defeats the purpose. If this happens to you too, you're in luck: a kind soul has written a simple Python replacement that works great. You can download it here: https://github.com/juanramoncastan/xfconnect-indicator/tree/main No need to clone the repo, you just need the Python script here and the two icons here and here.
Then replace the
Why this convoluted line you ask? Because The xfconnect-indicator icon should appear in the system tray reliably, and the functionalities are identical to kdeconnect-indicator. Finally, arguably the most useful bit of KDE Connect won't necessarily work quite right for you: the sftp plugin, aka the "Browse remote" option in the indicator, that lets you browse your cellphone's files with the file manager. In KDE, Gnome or Cinnamon, this is usually well integrated (particularly in KDE naturally): when you click on "Browse remote", Dolphin, Nautilus or Nemo appears and you can browse your cellphone's storage. In Sway, not so much. Most likely, if you hit "Browse remote", your default browser will open with a funky-looking To fix this problem, create this shell script somewhere in your home directoy. I usually put all my scripts in
This script extracts the UUID from the You can test it by calling it with the funky URI in your browser as argument: Nautilus should open at the right directory and you should see your cellphone's files. Then you need to make a .desktop file for the shell script, so xdg knows what to do with it. To do this, create the file
You can validate that the .desktop file is correct by doing:
Finally, register your .desktop file as the default handler for the
Check that it all works by trying to open the funky URI with xdg-open - which is really what KDE Connect does:
Nautilus should open at the correct directory now, instead of the browser:
And of course, the same should happen when you hit "Browse remote" too. |
||
| 1 Original | |||
| Post Reply |
Back to top |