flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

KDE Connect share intergration

Open jonibim opened this issue 3 years ago • 3 comments

Feature Description

I think it would be a nice touch to have an option on the flameshot gui that directly sends a screenshot to your phone via KDE Connect. Spectacle already has this feature implemented as shown in this image image

jonibim avatar Apr 18 '22 19:04 jonibim

Cool, I wonder if this can be integrated with the existing "Open With" feature.

borgmanJeremy avatar Apr 18 '22 20:04 borgmanJeremy

Hi, I am using glibc void-linux and the proposed fix in #2802 didn't complete the integration with kde-connect for me (not really sure if the problem related to the disto), however, I managed to get it working by crafting this desktop file in /usr/share/applications/kdeconnect_handler.desktop

[Desktop Entry]
Encoding=UTF-8
Name=KDE-Handler
Comment=KDE-Handler
Exec=kdeconnect-handler %U
Icon=kdeconnect
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

Now, it appears in the open with launcher

Image

BigFish2086 avatar Jun 16 '25 14:06 BigFish2086

another interesting approach is to use a script like this

#!/bin/bash

tmpfile=$(mktemp --suffix=.png)
/usr/bin/flameshot gui --raw > "$tmpfile"

# Save and Send
if [[ -s "$tmpfile" ]]; then
  dest=~/Pictures/$(basename "$tmpfile")
  mv "$tmpfile" "$dest"
  device=b29641e9917c472ab4a833f410bc90e4 # Device ID
  /usr/bin/kdeconnect-cli --share "$dest" -d "$device"
else
    rm -f "$tmpfile"
    exit 0
fi

# Get the Device ID
# device=$(/usr/bin/kdeconnect-cli --list-devices | grep '(paired and reachable)' | head -n1 | cut -d: -f2 | awk '{print $1}')

accepting the image would save it and send it to your other device. you can bind it to some shortcut on your keyboard for easy access

BigFish2086 avatar Jun 16 '25 21:06 BigFish2086

Hi, I am using glibc void-linux and the proposed fix in #2802 didn't complete the integration with kde-connect for me

I can confirm, that the KDE Connect integration doesn't work anymore. At the time of #2802 it worked for sure!

It seems there was a change at KDE Connect. At least I see, that the desktop files had changed and because of this Flameshot doesn't list KDE Connect in the 'Open with' dialog anymore. ~~I'll try if I can find an option to automatically integrate it into the dialog again.~~ Alternatively this might be a candidate for future Flameshot plugins.

Edit: Once this pull request for kdeconnect-android is merged, I'd assume, that sharing might work out of the box without any change at Flameshot.

ElTh0r0 avatar Jul 05 '25 14:07 ElTh0r0