5 ms·
I sometimes use my little service https://pushurl.43z.one/ https://pushurl.43z.one/ If I need to notify my desktop browser or phone with a notification triggere
by h43z 4y ago
I sometimes use my little service https://pushurl.43z.one/ https://pushurl.43z.one/ If I need to notify my desktop browser or phone with a notification triggered by some code.
I just go to the website with my browser click generate. Then in my script I do `curl $pushurl?title=jobdone`. When it gets triggered a notification popups on my phone that says "jobdone".
It uses the native browser web push API so I don't need to install anything extra.
- dlivingston 4y agoAwesome! Using it now. So seamless. Are there any other parameters besides `title`? _edit:_ wrote a little Bash function for this; seems to work well: function notify() { argTitle='TerminalNotification' argText="$1" argUrl='https://www.example.com' baseUrl='https://pushurl.43z.one/XXXXXXXXXXXXX' curl --get \ --data-urlencode "title=$argTitle" \ --data-urlencode "text=$argText" \ --data-urlencode "url=$argUrl" \ $baseUrl }
- h43z 4y agojust `title`, `text` and `url` (which will open the specified `url` on notification click)
- hu3 4y agoNeat. I guess you had to visit pushurl.43z.one once with each browser you want to be notified right? I'm just curious.
- h43z 4y agoYes, exactly. The pushurl has to be generated with the browser on the device which you want send notifications to. The pushurl is bound to that browser.
- getcrunk 4y agoIs the code public? Seems simple to implement. But I'd rather copy and paste.
- h43z 4y agoNo, I'm too lazy to make it available publicly.