ntfy is a simple pub/sub server for sending notifications to your devices. If you are connecting to the public instance, I suggest using a random string for the topic name as well as enabling encryption. If you are using a self-hosted instance, I suggest creating a new user solely for clipshift that is separate from any other user accounts.
Use clipshift config add-backend
to be guided through the configuration options or you can manually edit ~/.clipshift/config.yaml
and add the following:
-
Using the public server
backends: - type: ntfy host: https://ntfy.sh topic: some-random-string-here action: sync encryptionkey: some-key-here # optional, but recommended for the public instance
-
Using a self-hosted instance
backends: - type: ntfy host: https://ntfy.example.com user: some-user pass: some-password topic: clipshift action: sync encryptionkey: # optional, leave blank for no encryption
Note: encryption is currently not supported
Google, instead of making clipboard monitoring access a permission, has made it super locked down. So, unless Google changes course, there will probably never be an official clipshift app. But clipshift still works great with the offical ntfy app (Play Store, F-Droid) and Tasker.
Install both apps and subscribe to the topic you configured in your clipshift client(s) in the ntfy app.
This will be triggered when a ntfy message is receive and will set the clipboard accordingly.
- Open Tasker, if this is your first time using the app make sure you enable full Tasker and not TaskerNet (or whatever the beginner mode is called)
- Create a profile and name it whatever you want (I named mine
ntfy reactor
) - For the trigger select
Event
>System
>Intent Received
- In the
Action
field putio.heckel.ntfy.MESSAGE_RECEIVED
- Set both
Cat
fields toDefault
- Select the back arrow, and then
New Task
and you don't have to give it a name - In the Task Edit screen, hit the action button to add a step, select
Task
>If
- For the Condition, make the left box
%topic
and the right boxclipshift
(change accordingly if you're using a different topic name) - Hit the
+
button to add a second condition and make the fields%title
and%DEVMOD
(device model), then hit the button with the~
for that condition and change it toDoesn't Match
which will change the button to!~
- Hit the back arrow to save the step
- Select the action button to add a step and select
System
>Set Clipboard
- In the Text box put
%message
and select the back button to save the step. - Finally, we need to close the if statement so add a
Task
>End If
step and then hit the back button to save the Task. - Select the checkmark on the Tasker top bar to save your work.
On the latest versions of Android a share menu will appear when the clipboard is set, when it appears just share to ntfy and select the clipshift topic.
There is a very advanced way to have Tasker monitor your clipboard but it requires some hacky stuff, I'll type up some instructions if people ask for it.