swaync(1)

✨ swaync β€” the manual, but make it cute ✨

okay bestie, welcome to the swaync manual page πŸ’– the manual name is swaync, it lives in the General Commands Manual section, and it's giving notification daemon with a GTK gui for notifications and the control center. yeah. that's the whole vibe. let's go πŸ¦‹


🌸 NAME 🌸

swaync β€” a simple notification daemon with a GTK gui for notifications and the control center πŸ’…


πŸŽ€ USAGE πŸŽ€

swaync [option]

✨ OPTIONS ✨

  • -h, --help β€” show help options 🫢 (when u forget how anything works, no judgment)
  • -v, --version β€” prints version ⭐
  • -s, --style <CSS file> β€” use a custom Stylesheet file 🎨 yes u can make it pretty
  • --replace β€” replace the currently running instance of SwayNotificationCenter πŸ‘‘ one instance to rule them all
  • --skip-system-css β€” skip trying to parse the packaged Stylesheet file. useful for CSS debugging πŸ”
  • --custom-system-css β€” pick a custom CSS file to use as the "system" CSS. useful for CSS debugging πŸ” (yes it's basically the CSS-debugging sibling of the one above, they're a duo)
  • -c, --config <Config file> β€” use a custom config file πŸ“

⌨️ Control Center Keyboard Shortcuts ⌨️

keyboard shortcuts for the control center, memorize these, it's giving main character energy:

  • Up/Down: navigate notifications ⬆️⬇️
  • Home: navigate to the latest notification 🏠
  • End: navigate to the oldest notification πŸ”š
  • Escape/Caps_Lock: close notification panel πŸ’€ (yes caps lock. iconic.)
  • Return: execute default action or close notification if none ↩️
  • Delete/BackSpace: close notification πŸ—‘οΈ
  • Shift+C: close all notifications 🧹
  • Shift+D: toggle Do Not Disturb 🀫
  • Buttons 1-9: execute alternative actions πŸ”’
  • Left click button / actions: activate notification action πŸ–±οΈ
  • Middle/Right click notification: close notification πŸ–±οΈ

πŸ› οΈ CONFIGURATION πŸ› οΈ

the main config file lives at /etc/xdg/swaync/config.json πŸ“‚ copy it over to your ~/.config/swaync/ folder to customize without needing root access. periodt, no sudo needed bestie πŸ’…

to reload the config, you'll need to run swaync-client --reload-config πŸ”„

for information on the config file format, see swaync(5) πŸ“–

🧚 Scripting 🧚

scripting rules and logic, listen up:

  1. Only one script can be fired per notification
  2. Each script requires exec and at least one of the other properties
  3. All listed properties must match the notification for the script to be ran
  4. If any of the properties doesn't match, the script will be skipped
  5. If a notification doesn't include one of the properties, that property will be skipped

notification information can be printed into a terminal by running G_MESSAGES_DEBUG=all swaync (when a notification appears) πŸ›

config properties:

{
     "scripts": {
          "example-script": {
               "exec": "Your shell command or script here...",
               "app-name": "Notification app-name Regex",
               "summary": "Notification summary Regex",
               "body": "Notification body Regex",
               "urgency": "Low or Normal or Critical",
               "category": "Notification category Regex"
          }
     }
     other non scripting properties...
}

config.json example:

{
     "scripts": {
          // This script will only run when Spotify sends a notification containing
          // that exact summary and body
          "example-script": {
               "exec": "~/.config/swaync/myRickRollScript.sh",
               "app-name": "Spotify"
               "summary": "Never Gonna Give You Up",
               "body": "Rick Astley - Whenever You Need Somebody"
          }
     }
     other non scripting properties...
}

🚫 Disable scripting 🚫

to completely disable scripting, the project needs to be built like so:

meson build -Dscripting=false
ninja -C build
meson install -C build

🌈 Waybar Example 🌈

this example requires NotoSansMono Nerd Font to get the icons looking right πŸŽ€

Waybar config:

"custom/notification": {
     "tooltip": false,
     "format": "{icon}",
     "format-icons": {
          "notification": "<span foreground='red'><sup></sup></span>",
          "none": "",
          "dnd-notification": "<span foreground='red'><sup></sup></span>",
          "dnd-none": "",
          "inhibited-notification": "<span foreground='red'><sup></sup></span>",
          "inhibited-none": "",
          "dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
          "dnd-inhibited-none": ""
     },
     "return-type": "json",
     "exec-if": "which swaync-client",
     "exec": "swaync-client -swb",
     "on-click": "swaync-client -t -sw",
     "on-click-right": "swaync-client -d -sw",
     "escape": true
},

Waybar css file:

#custom-notification {
     font-family: "NotoSansMono Nerd Font";
}

ngl this whole page is swaync(1) from 2026-05-19 and that's the source/version + date situation, so consider this ur lil sign-off bestie 🫢 go forth and get notified πŸ’–βœ¨πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from