Advertisement
hnOsmium0001

KDE Service Menu: taildrop-send.desktop

Feb 19th, 2023
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. [Desktop Action taildrop-send]
  2. Name=Taildrop To Device...
  3. Icon=document-send
  4. # - The alternative to .DNSName and postprocessing is just using .HostName, except it doesn't work when the device has a custom device name set in the control panel
  5. # - We didn't have to turn it into lower case, but it's just consistent with the Windows and macOS UI
  6. # - We assume MagicDNS is enabled (I'm honestly not sure what will .MagicDNSSuffix be if it's not, I just don't have such an account to play with)
  7. Exec=/usr/bin/tailscale file cp '%U' $(tailscale status --json | jq '. as $root | .Peer[] | select(.UserID == $root.Self.UserID) | .DNSName | rtrimstr("." + $root.MagicDNSSuffix + ".") | ascii_downcase | [., ., "off"] | .[]' | xargs kdialog --radiolist 'Select a machine to send to:')
  8.  
  9. [Desktop Entry]
  10. Type=Service
  11. ServiceTypes=KonqPopupMenu/Plugin,all/all,all/allfiles
  12. Actions=taildrop-send
  13. X-KDE-Priority=TopLevel
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement