gsconnect (656B)
1 #!/usr/bin/env sh 2 3 #set -x 4 # Description: Send the selected (or hovered) files to your Android device using gsconnect daemon.js. 5 # GSConnect must be configured on the Android device and the PC. 6 # 7 # Shell: POSIX compliant 8 # Author: Darukutsu 9 selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection} 10 gsconnect=$HOME/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js 11 id=$($gsconnect -l) 12 13 if [ -s "$selection" ]; then 14 xargs -0 < "$selection" -I{} "$gsconnect" -d "$id" --share-file="{}" 15 # Clear selection 16 printf "-" > "$NNN_PIPE" 17 else 18 "$gsconnect" -d "$id" --share-file="$2/$1" 19 fi