Wsl Windows

Reminders with WSL

Hi everyone,

I was looking for an app that should allow me to set a quick reminder without any additional functionality.

The one was found, it is at binary which is available by default on most (if not all) Linux distributions (checkout man at). Shortly, the at command allows you to specify a command and time you want to run that command at.

My current setup

What I want, is to get a notification at some special time. For notifications we can use notify-send, but since I’m currently on Windows and use WSL, we will use my wsl-notify script (checkout for notify-send replacement for WSL post)

notify-send replacement for WSL

Hi,

Unfortunately there is no way currently to make brilliant notify-send work on WSL.

Solution

The workaround is to install BurntToast which is powershell module (or command) that allows you to show native notifications. After it’s installed we can write a script that can execute PowerShell “cmdlet” from within WSL.

Details

So when BurntToast is installed let’s create a super simple bash script (name it like wsl-notify)

#!/usr/bin/env -bash

powershell.exe "New-BurntToastNotification -Text \"$1\""

Give our wsl-notify execution rights (with chmod +x wsl-notify) and move it to /usr/bin folder with mv wsl-notify /usr/bin/