From f025cd8e7d5db46b03de1642205463326b3cb53f Mon Sep 17 00:00:00 2001 From: Caverns4 Date: Wed, 8 Dec 2021 16:42:17 -0500 Subject: [PATCH 1/2] -d supports optional path argument + Context menu file for Nemo File explorer. --- README.md | 3 ++- puush | 7 +++++-- puushFile.nemo_action | 10 ++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 puushFile.nemo_action diff --git a/README.md b/README.md index dc849cb..76c9c80 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,14 @@ Takes screenshots and uploads them to puush using the puush API and copies the l - (in Ubuntu it's system settings > keyboard > keyboard shortcuts > custom shortcuts) - Log out for the changes to take place - Here's what it looks like for mine: ![Puush keyboard setup](http://puu.sh/cOyVz/8dcb1cd498.png) +- If your linux install include Nemo File Manager (Such as Linux Mint), put puushFile.nemo_action in home/.local/share/nemo/actions ### Commands ``` bash puush -a # puush desktop puush -b # area puush puush -c # puush window -puush -d # file upload +puush -d PATH # file upload (Path optional) puush -h # help ``` diff --git a/puush b/puush index 30e8133..efc57b0 100755 --- a/puush +++ b/puush @@ -66,12 +66,11 @@ function helpText () printf " -a puush entire desktop\n" printf " -b select area to puush\n" printf " -c puush current window\n" - printf " -d puush specific file (opens file dialog)\n" + printf " -d puush a file (Optional path)\n" printf " -e puush clipboard contents\n" printf "\n" printf " --help,-h show this page\n" printf "\n" - printf "PATH:\n" printf " PATH optional: path of file to puush\n" } @@ -118,8 +117,12 @@ case "$1" in -d) echo "File Upload" + if [ -z "$2" ]; then fileName=`zenity --file-selection` puushFile "$fileName" + else + puushFile "$2" + fi ;; -e) diff --git a/puushFile.nemo_action b/puushFile.nemo_action new file mode 100644 index 0000000..f08226c --- /dev/null +++ b/puushFile.nemo_action @@ -0,0 +1,10 @@ +[Nemo Action] +Active=true +Name=Puush File +Comment=Puush This File +Exec=/usr/local/bin/puush/puush -d %F +Icon-Name=image +Selection=s +Extensions=jpg;png;bmp;gif +Terminal=false +Quote=double From 02b246fd9f2cff61c8c0c8e64376e5279322f7a0 Mon Sep 17 00:00:00 2001 From: Caverns4 Date: Wed, 8 Dec 2021 16:43:55 -0500 Subject: [PATCH 2/2] Typo fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76c9c80..863e002 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Takes screenshots and uploads them to puush using the puush API and copies the l - (in Ubuntu it's system settings > keyboard > keyboard shortcuts > custom shortcuts) - Log out for the changes to take place - Here's what it looks like for mine: ![Puush keyboard setup](http://puu.sh/cOyVz/8dcb1cd498.png) -- If your linux install include Nemo File Manager (Such as Linux Mint), put puushFile.nemo_action in home/.local/share/nemo/actions +- If your linux install includes Nemo File Manager (Such as Linux Mint), put puushFile.nemo_action in home/.local/share/nemo/actions ### Commands ``` bash