.\" Generated by scdoc 1.11.4 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "swaync" "5" "2026-03-23" .PP .SH NAME .PP swaync - Configuration file .PP .SH CONFIGURATION .PP Using a text editor with a JSON language server is recommended when editing the config file to be able to detect config errors .PP \fBignore-gtk-theme\fR .br type: bool .br default: true .br description: Unsets the GTK_THEME environment variable, fixing a lot of .br issues with GTK themes ruining the users custom CSS themes.\& .PP \fBpositionX\fR .br type: string .br default: right .br values: left, right, center .br description: Horizontal position of control center and notification window .PP \fBpositionY\fR .br type: string .br default: top .br values: top, center, bottom .br description: Vertical position of control center and notification window .PP \fBlayer\fR .br type: string .br default: overlay .br values: background, bottom, top, overlay .br description: Layer of notification window relative to normal windows.\& .br background is below all windows, overlay is above all windows.\& .PP \fBlayer-shell\fR .br type: bool .br default: true .br description: Wether or not the windows should be opened as layer-shell .br surfaces.\& Note: Requires swaync restart to apply .PP \fBcssPriority\fR .br type: string .br default: application .br values: application, user .br description: Which GTK priority to use when loading the default and user .br CSS files.\& Pick "user" to override \fBXDG_CONFIG_HOME/gtk-3.\&0/gtk.\&css\fR .PP \fBcontrol-center-positionX\fR .br type: string .br default: right .br values: left, right, center .br description: Optional: Horizontal position of the control center.\& .br Supersedes positionX if not set to `none`.\& .PP \fBcontrol-center-positionY\fR .br type: string .br default: top .br values: top, center, bottom .br description: Optional: Vertical position of the control center.\& .br Supersedes positionY if not set to `none`.\& .PP \fBcontrol-center-margin-top\fR .br type: integer .br default: 0 .br description: The margin (in pixels) at the top of the notification center.\& 0 to disable .PP \fBcontrol-center-margin-bottom\fR .br type: integer .br default: 0 .br description: The margin (in pixels) at the bottom of the notification center.\& 0 to disable .PP \fBcontrol-center-margin-right\fR .br type: integer .br default: 0 .br description: The margin (in pixels) at the right of the notification center.\& 0 to disable .PP \fBcontrol-center-margin-left\fR .br type: integer .br default: 0 .br description: The margin (in pixels) at the left of the notification center.\& 0 to disable .PP \fBcontrol-center-layer\fR .br type: string .br default: top .br values: background, bottom, top, overlay .br description: Layer of control center window relative to normal windows.\& .br background is below all windows, overlay is above all windows.\& .PP \fBcontrol-center-exclusive-zone\fR .br type: bool .br default: true .br description: Whether or not the control center should follow the .br compositors exclusive zones.\& An example would be setting it to .br \fBfalse\fR to cover your panel/dock.\& .PP \fBnotification-2fa-action\fR .br type: bool .br default: true .br description: If each notification should display a '\© "1234"'\& action .PP \fBtimeout\fR .br type: integer .br default: 10 .br description: The notification timeout for notifications with normal priority .PP \fBtimeout-low\fR .br type: integer .br default: 5 .br description: The notification timeout for notifications with low priority .PP \fBtimeout-critical\fR .br type: integer .br default: 0 .br description: The notification timeout for notifications with critical priority.\& 0 to disable .PP \fBnotification-window-width\fR .br type: integer .br default: 500 .br description: Width of the notification in pixels .PP \fBnotification-window-height\fR .br type: integer .br default: -1 .br description: Max height of the notification in pixels.\& -1 to use .br the full amount of space given by the compositor.\& .PP \fBnotification-window-preferred-output\fR .br type: string .br default: "" .br description: The preferred output to open the notification window .br (popup notifications).\& Can either be the monitor connector .br name (ex: "DP-1"), or the full name, manufacturer model serial .br (ex: "Acer Technologies XV272U V 503023B314202").\& .br If the output is not found, the currently focused one is picked.\& .PP \fBkeyboard-shortcuts\fR .br type: bool .br default: true .br description: If control center should use keyboard shortcuts .PP \fBnotification-grouping\fR .br type: bool .br default: true .br description: If notifications should be grouped by app name .PP \fBimage-visibility\fR .br type: string .br default: always .br values: always, when-available, never .br description: An explanation about the purpose of this instance.\& .PP \fBtransition-time\fR .br type: integer .br default: 200 .br description: The notification animation duration.\& 0 to disable .PP \fBhide-on-clear\fR .br type: bool .br default: false .br description: Hides the control center after pressing "Clear All" .PP \fBhide-on-action\fR .br type: bool .br default: true .br description: Hides the control center when clicking on notification action .PP \fBtext-empty\fR .br type: string .br default: "No Notifications" .br description: Text that appears when there are no notifications to show .PP \fBfit-to-screen\fR .br type: bool .br default: true .br description: Whether the control center should expand vertically to fill the screen .PP \fBrelative-timestamps\fR .br type: bool .br default: true .br description: Display notification timestamps relative to now e.\&g.\& "26 minutes ago".\& .br If false, a local iso8601-formatted absolute timestamp is displayed.\& .PP \fBcontrol-center-height\fR .br type: integer .br default: 500 .br description: Height of the control center in pixels.\& .br A value of -1 means that it will fit to the content.\& .br Ignored when '\&fit-to-screen'\& is set to '\&true'\&.\& .br Also limited to the height of the monitor, unless .br '\&layer-shell-cover-screen'\& is set to false.\& .PP \fBcontrol-center-width\fR .br type: integer .br default: 500 .br description: The control center width in pixels .PP \fBcontrol-center-preferred-output\fR .br type: string .br default: "" .br description: The preferred output to open the control center.\& Can either .br be the monitor connector name (ex: "DP-1"), or .br the full name, manufacturer model serial .br (ex: "Acer Technologies XV272U V 503023B314202").\& If the .br output is not found, the currently focused one is picked.\& .PP \fBnotification-action-filter\fR .br type: object .br visibility object properties: .br \fBuse-regex\fR .br type: bool .br optional: true .br default: false .br description: Indicates if all the below fields should use .br regex or not.\& .br \fBapp-name\fR .br type: string .br optional: true .br description: The app-name.\& .br \fBdesktop-entry\fR .br type: string .br optional: true .br description: The desktop-entry.\& .br \fBid-matcher\fR .br type: string .br optional: true (needs at least one \fBmatcher\fR) .br description: Matches the actions identifier.\& Can be found by .br reading the output of swaync when run with the .br \fBG_MESSAGES_DEBUG=all\fR environment variable.\& .br \fBtext-matcher\fR .br type: string .br optional: true (needs at least one \fBmatcher\fR) .br description: Matches the actions text visible in the notification.\& .br description: Hides matching action(s) of matching notifications.\& .br If the notification doesn'\&t include one of the properties, that .br property will be ignored.\& If all properties match the given .br notification, the matching actions will be hidden.\& .br example: .nf .RS 4 { "notification-action-filter": { "hide-chromium-settings": { "desktop-entry": "chromium-browser", "use-regex": false, "id-matcher": "settings", "text-matcher": "Settings" } }, } .fi .RE .PP \fBnotification-visibility\fR .br type: object .br visibility object properties: .br \fBstate\fR .br type: string .br optional: false .br default: enabled .br values: ignored, muted, transient, enabled .br description: The notification visibility state.\& .br \fBoverride-urgency\fR .br type: string .br optional: true .br default: unset .br values: unset, low, normal, critical .br description: The new urgency for the notification if set.\& .br \fBapp-name\fR .br type: string .br optional: true .br description: The app-name.\& Uses Regex.\& .br \fBdesktop-entry\fR .br type: string .br optional: true .br description: The desktop-entry.\& Uses Regex.\& .br \fBsummary\fR .br type: string .br optional: true .br description: The summary of the notification.\& Uses Regex.\& .br \fBbody\fR .br type: string .br optional: true .br description: The body of the notification.\& Uses Regex.\& .br \fBurgency\fR .br type: string .br optional: true .br default: Normal .br values: Low, Normal, Critical .br description: The urgency of the notification.\& .br \fBcategory\fR .br type: string .br optional: true .br description: Which category the notification belongs to.\& Uses Regex.\& .br description: Set the visibility or override urgency of each incoming .br notification.\& .br If the notification doesn'\&t include one of the properties, that .br property will be ignored.\& All properties (except for state) use .br regex.\& If all properties match the given notification, the .br notification will be follow the provided state.\& .br Only the first matching object will be used.\& .br example: .nf .RS 4 { "notification-visibility": { "example-name": { "state": "The notification state", "app-name": "Notification app-name Regex", "summary": "Notification summary Regex", "body": "Notification body Regex", "urgency": "Low or Normal or Critical", "category": "Notification category Regex" } } } .fi .RE .PP \fBwidgets\fR .br type: array .br Default values: ["title", "dnd", "notifications"] .br Valid array values (see \fBwidget-config\fR for more information): .br \fBnotifications\fR .br required: true .br optional: false .br \fBtitle\fR .br optional: true .br \fBdnd\fR .br optional: true .br \fBlabel\fR .br optional: true .br \fBmpris\fR .br optional: true .br \fBmenubar\fR .br optional: true .br \fBbuttons-grid\fR .br optional: true .br \fBslider\fR .br optional: true .br \fBvolume\fR .br optional: true .br \fBbacklight\fR .br optional: true .br \fBinhibitors\fR .br optional: true .br description: .br Which order and which widgets to display.\& .br If the "notifications" widget isn'\&t specified, it .br will be placed at the bottom.\& .br multiple of same widget: .br Append a # with any value to the end of the widget name.\& .br Example: "title#TheMainTitle" .br To address this widget specifically in the css file use the css class .\&TheMainTitle .br example: .nf .RS 4 { "widgets": [ "inhibitors", "title", "dnd", "notifications" ] } .fi .RE .PP \fBwidget-config\fR .br type: object .br description: Configure specific widget properties.\& .br multiple of same widget: .br Append a # with any value to the end of the widget name.\& .br Example: "title#TheMainTitle" .br To address this widget specifically in the css file use the css class .\&TheMainTitle .br Widgets to customize: .br \fBnotifications\fR .br type: object .br css class: widget-notifications .br properties: .br vexpand: .br type: bool .br optional: true .br default: true .br description: Whether or not the notifications widget .br should vertically expand or not .br description: The Notifications Widget.\& .br \fBtitle\fR .br type: object .br css class: widget-title .br properties: .br text: .br type: string .br optional: true .br default: "Notifications" .br description: The title of the widget .br clear-all-button: .br type: bool .br optional: true .br default: true .br description: Whether to display a "Clear All" button .br button-text: .br type: string .br optional: true .br default: "Clear All" .br description: "Clear All" button text .br description: The notification visibility state.\& .br \fBdnd\fR .br type: object .br css class: widget-dnd .br properties: .br text: .br type: string .br optional: true .br default: "Do Not Disturb" .br description: The title of the widget .br description: Control Center Do Not Disturb Widget.\& .br \fBlabel\fR .br type: object .br css class: widget-label .br properties: .br text: .br type: string .br optional: true .br default: "Label Text" .br description: The text content of the widget .br clear-all-button: .br type: integer .br optional: true .br default: 5 .br description: The maximum lines .br description: A generic widget that allows the user to add custom text.\& .br \fBmpris\fR .br type: object .br css classes: .br widget-mpris .br widget-mpris-player .br widget-mpris-title .br widget-mpris-subtitle .br properties: .br blacklist: .br type: array .br optional: true .br default: [] .br description: Audio sources for the mpris widget to ignore.\& .br Valid array values: .br type: string .br description: Audio source/app name.\& Regex allowed.\& Hint .br `$ qdbus | grep mpris` to find source names.\& .br autohide: .br type: bool .br optional: true .br default: false .br description: Whether to hide the widget when the .br player has no metadata.\& .br show-album-art: .br type: string .br optional: true .br default: "always" .br description: Whether or not the album art should be .br hidden, always visible, or only visible .br when a valid album art is provided.\& .br enum: ["right", "left"] .br loop-carousel: .br type: bool .br optional: true .br default: false .br description: Whether to loop through the mpris carousel.\& .br description: A widget that displays multiple music players.\& .br \fBmenubar\fR .br type: object .br css classes: .br widget-menubar .br .\&widget-menubar>box>.\&menu-button-bar .br name of element given after menu or buttons with # .br patternProperties: .br menu#: .br type: object .br properties: .br label: .br type: string .br optional: true .br default: "Menu" .br description: Label of button to show/hide menu dropdown .br position: .br type: string .br optional: true .br default: "right" .br description: Horizontal position of the button in the bar .br enum: ["right", "left"] .br animation-type: .br type: string .br optional: true .br default: "slide_down" .br description: Animation type for menu .br enum: ["slide_down", "slide_up", "none"] .br animation-duration: .br type: integer .br optional: true .br default: 250 .br description: Duration of animation in milliseconds .br actions: .br type: array .br Default values: [] .br Valid array values: .br type: object .br properties: .br label: .br type: string .br default: "label" .br description: Text to be displayed in button .br command: .br type: string .br default: "" .br description: "Command to be executed on click" .br type: .br type: string .br default: "normal" .br description: Type of the button.\& .br Toggle buttons receive the '\&.\&active'\& css class .br enum: ["normal", "toggle"] .br update-command: .br type: string .br default: "" .br description: "Command to be executed on visibility change of .br cc to update the active state of the toggle button (should .br echo true or false)" .br active: .br type: bool .br default: false .br description: Wether the toggle button is active as default or not .br description: A list of actions containing a label and a command .br description: A button to reveal a dropdown with action-buttons .br buttons#: .br type: object .br properties: .br position: .br type: string .br optional: true .br default: "right" .br description: Horizontal position of the buttons in the bar .br enum: ["right", "left"] .br actions: .br type: array .br Default values: [] .br Valid array values: .br type: object .br properties: .br label: .br type: string .br default: "label" .br description: Text to be displayed in button .br command: .br type: string .br default: "" .br description: "Command to be executed on click" .br type: .br type: string .br default: "normal" .br description: Type of the button .br Toggle buttons receive the '\&.\&active'\& css class and an env .br variable "SWAYNC_TOGGLE_STATE" is set.\& See example usage in the .br default config.\&json .br enum: ["normal", "toggle"] .br update-command: .br type: string .br default: "" .br description: "Command to be executed on visibility change of .br cc to update the active state of the toggle button (should .br echo true or false)" .br active: .br type: bool .br default: false .br description: Wether the toggle button is active as default or not .br description: A list of actions containing a label and a command .br description: A list of buttons to be displayed in the menu-button-bar .br \fBbuttons-grid\fR .br type: object .br css class: widget-buttons (access buttons with >flowbox>flowboxchild>button) .br properties: .br buttons-per-row: .br type: number .br actions: .br type: array .br Default values: [] .br Valid array values: .br type: object .br properties: .br label: .br type: string .br default: "label" .br description: Text to be displayed in button .br command: .br type: string .br default: "" .br description: "Command to be executed on click" .br type: .br type: string .br default: "normal" .br description: Type of the button .br Toggle buttons receive the '\&.\&active'\& css class and an env .br variable "SWAYNC_TOGGLE_STATE" is set.\& See example usage in the .br default config.\&json .br enum: ["normal", "toggle"] .br active: .br type: bool .br default: false .br description: Wether the toggle button is active as default or not .br description: A list of actions containing a label and a command .br description: A grid of buttons that execute shell commands .br \fBslider\fR .br type: object .br css class: widget-slider .br properties: .br label: .br type: string .br optional: true .br default: "slider" .br description: Text displayed in front of the slider .br cmd_setter: .br type: string .br optional: true .br default: "" .br description: command to set the value.\& Use $value to get .br the current value.\& .br cmd_getter: .br type: string .br optional: true .br default: "" .br description: command to get the actual value.\& .br Use $value to get the current value.\& .br min: .br type: integer .br optional: true .br default: 0 .br description: minimum value of the slider range .br max: .br type: integer .br optional: true .br default: 100 .br description: maximum value of the slider range .br min_limit: .br type: integer .br optional: true .br default: 0 .br description: limit minimum value of the slider .br max_limit: .br type: integer .br optional: true .br default: 100 .br description: limit maximum value of the slider .br value_scale: .br type: integer .br optional: true .br default: 0 .br description: scale small value, slider round digits .br description: general slider control .br \fBvolume\fR .br type: object .br css class: .br widget-volume .br per-app-volume .br properties: .br label: .br type: string .br optional: true .br default: "Volume" .br description: Text displayed in front of the volume slider .br show-per-app: .br type: bool .br optional: true .br default: false .br description: Show per app volume control .br show-per-app-icon: .br type: bool .br optional: true .br default: false .br description: Show application icon in per app control .br show-per-app-label: .br type: bool .br optional: true .br default: false .br description: Show application name in per app control .br expand-per-app: .br type: bool .br optional: true .br default: false .br description: If the per app section should start expanded .br empty-list-label: .br type: string .br optional: true .br default: "No active sink input" .br description: Text displayed when there are not active sink inputs .br expand-button-label: .br type: string .br optional: true .br default: "⇧" .br description: Label displayed on button to show per app volume control .br collapse-button-label: .br type: string .br optional: true .br default: "⇩" .br description: Label displayed on button to hide per app volume control .br animation-type: .br type: string .br optional: true .br default: "slide_down" .br description: Animation type for the per app volume control .br enum: ["slide_down", "slide_up", "none"] .br animation-duration: .br type: integer .br optional: true .br default: 250 .br description: Duration of animation in milliseconds .br description: Slider to control pulse volume .br \fBbacklight\fR .br type: object .br css class: widget-backlight .br properties: .br label: .br type: string .br optional: true .br default: "Brightness" .br description: Text displayed in front of the backlight slider .br device: .br type: string .br optional: true .br default: "intel_backlight" .br description: Device in `/sys/class/backlight` or `/sys/class/leds` .br subsystem: .br type: string .br optional: true .br default: "backlight" .br description: Kernel subsystem for brightness control .br enum: ["backlight", "leds"] .br min: .br type: integer .br optional: true .br default: 0 .br description: Lowest possible value for brightness .br description: Slider to control screen brightness .br \fBinhibitors\fR .br type: object .br css class: widget-inhibitors .br properties: .br text: .br type: string .br optional: true .br default: "Inhibitors" .br description: The title of the widget .br clear-all-button: .br type: bool .br optional: true .br default: true .br description: Whether to display a "Clear All" button .br button-text: .br type: string .br optional: true .br default: "Clear All" .br description: "Clear All" button text .br description: Displayed if notifications are inhibited.\& .PP .RS 4 example: .RE .nf .RS 4 { "widget-config": { "title": { "text": "Notifications", "clear-all-button": true, "button-text": "Clear All" }, "dnd": { "text": "Do Not Disturb" }, "label": { "max-lines": 5, "text": "Label Text" }, "mpris": { "blacklist": ["playerctld"], "autohide": true, "show-album-art": "always", "loop-carousel": false }, "menubar": { "menu#power": { "label": "Power", "position": "right", "actions": [ { "label": "Shut down", "command": "systemctl poweroff" }, \&.\&.\&. ] }, "buttons#screenshot": { "position": "left", "actions": [ { "label": "Screenshot", "command": "grim" }, \&.\&.\&. ] } }, "buttons": { "actions": [ { "label": "wifi", "command": "rofi-wifi-menu" }, \&.\&.\&. ] } } } .fi .RE .PP .SH Scripts .PP \fBscript-fail-notify\fR .br type: bool .br default: true .br description: Sends a notification if a script fails to run .PP \fBscripts\fR .br type: object .br script object properties: .br \fBexec\fR .br type: string .br optional: false .br description: The script to run.\& Can also run regular shell commands.\& .br \fBapp-name\fR .br type: string .br optional: true .br description: The app-name.\& Uses Regex.\& .br \fBdesktop-entry\fR .br type: string .br optional: true .br description: The desktop-entry.\& Uses Regex.\& .br \fBsummary\fR .br type: string .br optional: true .br description: The summary of the notification.\& Uses Regex.\& .br \fBbody\fR .br type: string .br optional: true .br description: The body of the notification.\& Uses Regex.\& .br \fBurgency\fR .br type: string .br optional: true .br default: Normal .br values: Low, Normal, Critical .br description: The urgency of the notification.\& .br \fBcategory\fR .br type: string .br optional: true .br description: Which category the notification belongs to.\& Uses Regex.\& .br \fBsound-file\fR .br type: string .br optional: true .br description: Which sound file the notification requested.\& Uses Regex.\& .br \fBsound-name\fR .br type: string .br optional: true .br description: Which sound name the notification requested.\& Uses Regex.\& .br \fBrun-on\fR .br type: string .br optional: true .br values: action, receive .br default: receive .br description: Whether to run this action when the notification is .br received, or when an action is taken on it.\& .br description: Which scripts to check and potentially run for every .br notification.\& If the notification doesn'\&t include one of the properties, .br that property will be ignored.\& All properties (except for exec) use regex.\& .br If all properties match the given notification, the script will be run.\& .br Only the first matching script will be run.\& .br example: .nf .RS 4 { "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" } } } .fi .RE .PP .RS 4 You can also use these environment variables in your script: .RE .nf .RS 4 $SWAYNC_BODY="Notification body content" $SWAYNC_DESKTOP_ENTRY="Desktop entry" $SWAYNC_URGENCY="Notification urgency" $SWAYNC_TIME="Notification time" $SWAYNC_APP_NAME="Notification app name" $SWAYNC_CATEGORY="SwayNC notification category" $SWAYNC_REPLACES_ID="ID of notification to replace" $SWAYNC_ID="SwayNC notification ID" $SWAYNC_SUMMARY="Notification summary" $SWAYNC_HINT_[NAME]="Value of the hint [NAME]" $SWAYNC_SOUND_NAME="The name of the requested sound" $SWAYNC_SOUND_FILE="The file path of the requested sound" .fi .RE