mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-10-27 09:57:32 +03:00
37142fcb37
* Close control center when clearing all notifications * make hide on clear configurable, disabled by default
3.1 KiB
3.1 KiB
SwayNotificationCenter
A simple notification daemon with a GTK gui for notifications and the control center
Features
- Keyboard shortcuts
- Notification body markup with image support
- A panel to view previous notifications
- Show album art for notifications like Spotify
- Do not disturb
- Click notification to execute default action
- Show alternative notification actions
- Customization through a CSS file
- Trackpad/mouse gesture to close notification
- The same features as any other basic notification daemon
- Basic configuration through a JSON config file
- Hot-reload config through
swaync-client
Planned Features
- Slick animations 😎
- Other build scripts than a PKGBUILD (debian and/or RHEL systems)
Install
Arch: The package is available on the AUR
Other:
meson build
ninja -C build
meson install -C build
Sway Usage
# Notification Daemon
exec swaync
# Toggle control center
bindsym $mod+Shift+n exec swaync-client -t -sw
Run
To start the daemon (remember to kill any other notification daemon before running)
./build/src/swaync
To toggle the panel
./build/src/swaync-client -t
To reload the config
./build/src/swaync-client -R
Control Center Shortcuts
- Up/Down: Navigate notifications
- Home: Navigate to the latest notification
- End: Navigate to the oldest notification
- Escape/Caps_Lock: Close notification panel
- Return: Execute default action or close notification if none
- Delete/BackSpace: Close notification
- C: Close all notifications
- D: Toggle Do Not Disturb
- Buttons 1-9: Execute alternative actions
Configuring
The main config file is located in /etc/xdg/swaync/config.json
. Copy it over
to your .config/swaync/
folder to customize without needing root access.
To reload the config, you'll need to run swaync-client --reload-config
positionX
:left
,right
orcenter
positionY
:top
orbottom
timeout
: uint (Any positive number). The notification timeout for notifications with normal prioritytimeout-low
: uint (any positive number without decimals). The notification timeout for notifications with low prioritytimeout-critical
: uint (any positive number without decimals, 0 to disable). The notification timeout for notifications with critical prioritykeyboard-shortcuts
:true
orfalse
. If control center should use keyboard shortcutsimage-visibility
:always
,when-available
ornever
. Notification image visibliltytransition-time
: uint (Any positive number, 0 to disable). The notification animation durationnotification-window-width
: uint (Any positive number). Width of the notification in pixelshide-on-clear
: bool. Hides the control center after pressing "Clear All"
The main CSS style file is located in /etc/xdg/swaync/style.css
. Copy it over to your .config/swaync/
folder to customize without needing root access.
Screenshots
I wonder how this would look with some blur 🤔