- Create a file in
C:\bin\toast.ps1
from source https://gist.github.com/dend/5ae8a70678e3a35d02ecd39c12f99110:curl https://gist.githubusercontent.com/dend/5ae8a70678e3a35d02ecd39c12f99110/raw -o /mnt/c/bin/toast.ps1
- Create
~/.local/bin/notify-send
from the following source:like this:powershell.exe "& { . C:\\bin\\toast.ps1; Show-Notification -ToastTitle \"$1\" -ToastText \"$2\" }"
echo 'powershell.exe "& { . C:\\bin\\toast.ps1; Show-Notification -ToastTitle \"$1\" -ToastText \"$2\" }"' > ~/.local/bin/notify-send
- Add executable permission on script:
chmod +x ~/.local/bin/notify-send
Usage example:
notify-send "Hello world!!!"
notify-send "Hello" "world!!!"