sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

kdeconnect (729B)


      1 #!/usr/bin/env sh
      2 
      3 # Description: Send the selected files to your Android device using kdeconnect-cli.
      4 #              kdeconnect must be configured on the Android device and the PC.
      5 #
      6 # Shell: POSIX compliant
      7 # Author: juacq97
      8 
      9 selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
     10 
     11 id=$(kdeconnect-cli -a --id-only | awk '{print $1}')
     12 if [ -s "$selection" ]; then
     13     kdeconnect-cli -d "$id" --share "$(cat "$selection")"
     14 
     15     # If you want a system notification, uncomment the next 3 lines.
     16     #notify-send -a "Kdeconnect" "Sending $(cat "$selection")"
     17 #else
     18     #notify-send -a "Kdeconnect" "No file selected"
     19 
     20     # Clear selection
     21     if [ -p "$NNN_PIPE" ]; then
     22         printf "-" > "$NNN_PIPE"
     23     fi
     24 fi