Skip to content

Commit 220b119

Browse files
committed
docs: add troubleshooting / help
1 parent aabeebc commit 220b119

File tree

1 file changed

+52
-3
lines changed

1 file changed

+52
-3
lines changed

README.md

+52-3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ This library is packaged with [ntfy-desktop](https://github.com/Aetherinox/ntfy-
6969
- [Create App Shortcut](#create-app-shortcut)
7070
- [Call App](#call-app)
7171
- [Help](#help)
72+
- [How to change text `NtfyToast` at the top of notifications](#how-to-change-text-ntfytoast-at-the-top-of-notifications)
73+
- [Can't use Windows Toast notifications in WSL2](#cant-use-windows-toast-notifications-in-wsl2)
74+
- [Distributing Toasted-Notifer with Electron](#distributing-toasted-notifer-with-electron)
75+
- [Using Webpack](#using-webpack)
76+
- [Windows: Where are shortcut / .lnk files placed](#windows-where-are-shortcut--lnk-files-placed)
77+
- [Usage in tmux session](#usage-in-tmux-session)
7278

7379

7480
<br />
@@ -692,14 +698,14 @@ With the above code, we have specified an `appID` on the following line:
692698
<br />
693699

694700
## Help
695-
- How do I change the text `NtfyToast` at the top of the notification
701+
### How to change text `NtfyToast` at the top of notifications
696702
In order to change the text `NtfyToast`, you must supply an `-appID`. Windows Toast notifications require that you provide an application id for a valid Windows application before Windows will allow you to link another program.
697703

698704
For instructions on accomplishing this, read the section [appID support](#appid-support)
699705

700706
<br />
701707

702-
- Can't use Windows Toast notifications in WSL2
708+
### Can't use Windows Toast notifications in WSL2
703709
Ntfy makes use of a 3rd party package for Windows notifications to work. You must change the permissions on the Ntfy vendor .exe in order for it to work properly.
704710

705711

@@ -718,7 +724,7 @@ You can add a `postinstall` action in the `package.json`:
718724
719725
<br />
720726
721-
- Distributing Toasted-Notifer with Electron
727+
### Distributing Toasted-Notifer with Electron
722728
If you package your Electron based app as an asar; toasted-notifier will fail to load. This is because of how a asar package works. You cannot execute a binary from within an asar package.
723729
724730
Is solution is that when packaging the app into an asar, make sure you `--unpack` the `vendor/` folder of toasted-notifier so that the module still has access to the notification vendor binaries.
@@ -744,6 +750,49 @@ build: {
744750
745751
<br />
746752
753+
### Using Webpack
754+
When using toasted-notifier inside of webpack, you must add the snippet below to your `webpack.config.js`.
755+
756+
```javascript
757+
node: {
758+
__filename: true,
759+
__dirname: true
760+
}
761+
```
762+
763+
This is necessary because toasted-notifier loads the notifiers from a binary, and needs a relative file path. When webpack compiles the modules, it suppresses file directories, causing toasted-notifier to error on certain platforms.
764+
765+
<br />
766+
767+
### Windows: Where are shortcut / .lnk files placed
768+
In order for you to make your own custom application name appear at the top of a notification, you must create a `.lnk` in your Windows start menu. More about this is outlined in the section [AppID Support](#appid-support)
769+
770+
<br />
771+
772+
If you need to delete any of the generated `.lnk` files, you can find them in the following locations:
773+
- `C:\ProgramData\Microsoft\Windows\Start Menu\Programs`
774+
- `C:\Users\YOURUSERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs`
775+
776+
<br />
777+
778+
Delete any folders named `NtfyToast`, or whatever your custom app name is.
779+
780+
<br />
781+
782+
### Usage in tmux session
783+
When using toasted-notifier within a tmux session, it can cause the system to abruptly hang. To solve this issue:
784+
785+
- Upgrade **tmux** from `1.9a` to `2.0` with `brew update && brew upgrade tmux`
786+
- Install **reattach-to-user-namespace** with `brew update && brew install reattach-to-user-namespace`
787+
- Open `~/.tmux.conf` and add the following lines:
788+
```
789+
# Reattach each new window to the user bootstrap namespace
790+
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
791+
set -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL -l"
792+
```
793+
794+
795+
747796
<br />
748797
749798
---

0 commit comments

Comments
 (0)