-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add send-with-kdeconnect@rcalixte (#18)
- Loading branch information
Showing
8 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
### 1.0 | ||
|
||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
SEND WITH KDE CONNECT | ||
===================== | ||
|
||
Send file(s) to a device paired with KDE Connect. | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
This is an action that will send selected file(s) to a selected device that is | ||
paired with KDE Connect and available. | ||
|
||
__NOTE:__ If there are no devices available, an error will be shown. | ||
|
||
DEPENDENCIES | ||
------------ | ||
|
||
The following programs must be installed and available: | ||
|
||
* `gettext` for translations in the action's script | ||
* `kdeconnect-cli` to provide the CLI for KDE Connect | ||
* `zenity` to display dialogs |
Binary file added
BIN
+25.7 KB
send-with-kdeconnect@rcalixte/files/send-with-kdeconnect@rcalixte/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
send-with-kdeconnect@rcalixte/files/send-with-kdeconnect@rcalixte/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"description": "Send file(s) with KDE Connect", | ||
"uuid": "send-with-kdeconnect@rcalixte", | ||
"name": "Send with KDE Connect", | ||
"author": "rcalixte", | ||
"version": "1.0" | ||
} |
47 changes: 47 additions & 0 deletions
47
...connect@rcalixte/files/send-with-kdeconnect@rcalixte/po/[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Send with KDE Connect | ||
# Copyright (C) 2023 | ||
# Rick Calixte <[email protected]>, 2023. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: 1.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-11-28 22:58-0500\n" | ||
"PO-Revision-Date: \n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: en\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"X-Generator: Poedit 3.4\n" | ||
|
||
#. metadata.json->description | ||
msgid "Send file(s) with KDE Connect" | ||
msgstr "" | ||
|
||
#. metadata.json->name | ||
#. Name | ||
msgid "Send with KDE Connect" | ||
msgstr "" | ||
|
||
#. Comment | ||
msgid "Send file(s) to a paired device" | ||
msgstr "" | ||
|
||
#: [email protected]:5 | ||
msgid "File(s) to send" | ||
msgstr "" | ||
|
||
#: [email protected]:6 | ||
msgid "Select the target device" | ||
msgstr "" | ||
|
||
#: [email protected]:7 | ||
msgid "Device Name" | ||
msgstr "" | ||
|
||
#: [email protected]:8 | ||
msgid "No devices available.\\n\\nPlease check KDE Connect and try again." | ||
msgstr "" |
28 changes: 28 additions & 0 deletions
28
...-kdeconnect@rcalixte/files/send-with-kdeconnect@rcalixte/[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /bin/bash | ||
|
||
TEXTDOMAIN="send-with-kdeconnect@rcalixte" | ||
TEXTDOMAINDIR="${HOME}/.local/share/locale" | ||
_TITLE=$"File(s) to send" | ||
_TEXT=$"Select the target device" | ||
_COLUMN=$"Device Name" | ||
_NODEVICES=$"No devices available.\n\nPlease check KDE Connect and try again." | ||
TITLE="$(/usr/bin/gettext "$_TITLE")" | ||
TEXT="$(/usr/bin/gettext "$_TEXT")" | ||
COLUMN="$(/usr/bin/gettext "$_COLUMN")" | ||
NODEVICES="$(/usr/bin/gettext "$_NODEVICES")" | ||
|
||
declare -A DEVICEMAP | ||
|
||
while IFS=' ' read -r value key; do | ||
DEVICEMAP[$key]=$value; | ||
done <<< $(/usr/bin/kdeconnect-cli --id-name-only --list-available 2>/dev/null) | ||
|
||
[[ ${#DEVICEMAP[@]} -eq 0 ]] && /usr/bin/zenity --error --text="${NODEVICES}" && exit 1 | ||
|
||
SELECTION=$(/usr/bin/zenity --list --title "${TITLE}" --column "${COLUMN}" --text "${TEXT}:" "${!DEVICEMAP[@]}") | ||
|
||
[[ -z $SELECTION ]] && exit | ||
|
||
for filename in "$@"; do | ||
/usr/bin/kdeconnect-cli --device "${DEVICEMAP[$SELECTION]}" --share "${filename}" | ||
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"author": "rcalixte" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[Nemo Action] | ||
_Name=Send with KDE Connect | ||
_Comment=Send file(s) to a paired device | ||
Exec=<send-with-kdeconnect@rcalixte/[email protected] %F> | ||
Selection=notnone | ||
Extensions=nodirs; | ||
Dependencies=gettext;kdeconnect-cli;zenity; |