System Notifications
System notifications are native operating system alerts that appear in your system’s notification center or system tray. Unlike IDE-embedded notifications—which only appear within the editor—system notifications remain visible even when:
- The IDE is minimized or running in the background
- You’re using other applications
- Your screen is locked (depending on OS settings)
- You’re away from your computer
These notifications inform you about:
- Task completion status
- Critical errors or warnings
- Progress updates for long-running operations
- Key system events
Supported Operating Systems
System notifications work across all major platforms, though they rely on different underlying technologies:
| Operating System | Technology | Requirements |
|---|---|---|
| macOS | AppleScript + terminal-notifier | Built-in support; optional enhancements |
| Windows | PowerShell + Windows Runtime | Configured PowerShell execution policy |
| Linux | notify-send | libnotify package installed |
Platform-Specific Setup
macOS Configuration
macOS offers the best built-in support for system notifications, with two available methods:
Method 1: Built-in AppleScript (Fallback)
No additional setup required. Uses macOS-native commands to display notifications.
Method 2: Enhanced via terminal-notifier (Recommended)
For richer notifications with custom icons, install terminal-notifier:
# Install via Homebrew
brew install terminal-notifier
# Or via npm
npm install -g terminal-notifierHow it works: VJSP first attempts to use terminal-notifier. If not found, it automatically falls back to AppleScript.
Windows Configuration
Windows notifications require proper PowerShell execution policy configuration.
Step 1: Configure PowerShell Execution Policy
Open PowerShell as Administrator and run:
# Check current policy
Get-ExecutionPolicy
# Allow local scripts to run (recommended)
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserStep 2: Verify Windows Runtime Access
Notifications use the Windows.UI.Notifications API via PowerShell. Supported on:
- ✅ Windows 10 (all editions)
- ✅ Windows 11 (all editions)
- ✅ Windows Server 2016+
- ❌ Windows 8.1 and earlier (limited or no support)
Execution Policy Options
| Policy | Description | Security Level | Recommendation |
|---|---|---|---|
Restricted | Blocks all script execution (default) | Highest | ❌ Prevents notifications |
RemoteSigned | Local scripts run; downloaded scripts must be signed | High | ✅ Recommended |
Unrestricted | All scripts run (with warnings) | Medium | ⚠️ Use with caution |
AllSigned | All scripts must be digitally signed | Highest | ❌ Overly restrictive |
Linux Configuration
Linux requires the libnotify package and the notify-send command.
Ubuntu/Debian
sudo apt update
sudo apt install libnotify-bin
which notify-send # Verify installationRed Hat / CentOS / Fedora
# RHEL/CentOS
sudo yum install libnotify
# Fedora
sudo dnf install libnotify
which notify-send # VerifyArch Linux
sudo pacman -S libnotify
which notify-send # VerifyDesktop Environment Compatibility
| Desktop Environment | Support Level | Notes |
|---|---|---|
| GNOME | ✅ Full | Native notification center |
| KDE Plasma | ✅ Full | Integrated notification system |
| XFCE | ✅ Good | Requires notification daemon |
| Unity | ✅ Full | Ubuntu’s notification system |
| i3 / Sway | ⚠️ Limited | Manual daemon setup needed |
| Headless | ❌ None | No display server available |
Notification Daemon Setup (Advanced)
For lightweight window managers, manually start a notification daemon:
# Install dunst (lightweight daemon)
sudo apt install dunst # Debian/Ubuntu
sudo pacman -S dunst # Arch
# Start manually
dunst &
# Or auto-start with your WM
echo "dunst &" >> ~/.xinitrcVerifying System Notifications
Test Commands by Platform
macOS
# Test AppleScript
osascript -e 'display notification "Test message" with title "Test Title" sound name "Tink"'
# Test terminal-notifier (if installed)
terminal-notifier -message "Test message" -title "Test Title" -sound TinkWindows
$template = @"
<toast>
<visual>
<binding template="ToastText02">
<text id="1">Test Title</text>
<text id="2">Test message</text>
</binding>
</visual>
</toast>
"@
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($template)
$toast = [Windows.UI.Notifications.ToastNotification]::new($xml)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("Test App").Show($toast)Linux
# Basic test
notify-send "Test Title" "Test message"
# With icon (optional)
notify-send -i dialog-information "Test Title" "Test message"Troubleshooting
Common Issues & Solutions
macOS
Issue: Notifications don’t appear
- ✅ Check System Settings → Notifications → Terminal (or IDE) → Ensure “Allow Notifications” is on
- ✅ Disable Do Not Disturb mode
- ✅ Test manually using commands above
- ✅ Reinstall
terminal-notifier:brew install --force terminal-notifier
Windows
Issue: “Execution of scripts is disabled”
- 🔧 Run:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Issue: Notifications missing in Windows 11
- ✅ Go to Settings → System → Notifications → Enable notifications
- ✅ Turn off Focus Assist
- ✅ Ensure Windows Push Notifications User Service is running
Issue: PowerShell script errors
- 🔧 Update PowerShell to v5.1+
- 🔍 Check version:
$PSVersionTable.PSVersion
Linux
Issue: notify-send: command not found
- 🔧 Install
libnotify-bin(Debian/Ubuntu),libnotify(RHEL/Fedora), orlibnotify(Arch)
Issue: No notifications in i3/Sway
- 🔧 Install and run a daemon:
sudo apt install dunst && dunst &
Issue: Permission denied or blank display
- 🔍 Verify X11/Wayland session:
echo $DISPLAYshould return:0or similar - 🔐 Ensure your user has access to the display server
With properly configured system notifications, you’ll never miss critical updates—even when you’re away from your IDE.
