Skip to content

[Bug]: Black background on right side when swaync notification appears #1611

@kaungkhantko

Description

@kaungkhantko

[Bug]: Black background appears on right side of screen when swaync notification pops up

Description

When a notification fires, a black rectangle appears on the right side of the screen covering the full height of the monitor. This is caused by two issues in HyDE's default configuration:

  1. Configs/.config/hypr/windowrules.conf applies blur true + ignore_alpha 0 to swaync-notification-window. Because swaync's layer-shell surface spans the full monitor height (due to fit-to-screen: true), Hyprland renders blur across the entire 400×(monitor height) transparent surface. ignore_alpha 0 only excludes pixels with exactly 0 alpha, so any anti-aliasing or partial transparency still gets blurred into a dark artifact.

  2. Configs/.local/share/hyde/wallbash/theme/swaync.dcol (which generates theme.css) is missing notificationwindow, blankwindow { background: transparent; }. Without this rule, the GTK window node for swaync keeps its default dark background, making the entire layer surface appear black.

Steps to Reproduce

  1. Fresh HyDE install with default windowrules.conf and swaync config
  2. Trigger any notification (e.g. notify-send "Test" "Hello")
  3. Observe a black rectangle on the right side of the screen for the duration of the notification

Easier to reproduce on a multi-monitor setup where one monitor is portrait (tall), because the layer surface is even taller.

Expected Behavior

Only the notification popup itself is visible; the rest of the screen is unaffected.

Actual Behavior

A black/dark rectangle (400px wide, full monitor height) appears on the right side of the screen whenever a notification is active.

Root Cause

Issue 1 — Missing GTK transparency rule in swaync CSS template

swaync.dcol generates theme.css but does not include:

notificationwindow, blankwindow {
    background: transparent;
    background-color: transparent;
}

This is the correct GTK CSS node name for the swaync notification window (confirmed in swaync's own default CSS at /etc/xdg/swaync/style.css). Without it, GTK renders a dark background across the full layer-shell surface.

Issue 2 — ignore_alpha 0 too low for blur on swaync-notification-window

In windowrules.conf:

layerrule = blur true,match:namespace swaync-notification-window
layerrule = ignore_alpha 0,match:namespace swaync-notification-window

ignore_alpha 0 means only fully transparent pixels (alpha = 0.0 exactly) are excluded from blur. Any pixel with even slight alpha (from GTK rendering/anti-aliasing) still participates in blur, producing dark halos/backgrounds on the transparent layer area. Should be ignore_alpha 0.5 at minimum, or blur should be disabled for the notification window.

Fix

Fix 1 — Add to Configs/.local/share/hyde/wallbash/theme/swaync.dcol (and Configs/.config/swaync/style.css):

notificationwindow, blankwindow {
    background: transparent;
    background-color: transparent;
}

Fix 2 — In Configs/.config/hypr/windowrules.conf, change:

layerrule = ignore_alpha 0,match:namespace swaync-notification-window

to:

layerrule = ignore_alpha 0.5,match:namespace swaync-notification-window

(or disable blur for the notification window entirely)

Environment

  • HyDE commit: 7493044 (master)
  • Hyprland: 0.47.x – 0.53.x (reproduced on 0.53.3)
  • swaync: 0.12.4
  • OS: Manjaro Linux
  • GPU: Dual monitor setup (DP-1 2560×1440 + HDMI-A-1 1080×1920 portrait)
  • Relevant HyDE files:
    • Configs/.config/hypr/windowrules.conf (layerrule section at bottom)
    • Configs/.local/share/hyde/wallbash/theme/swaync.dcol
    • Configs/.config/swaync/style.css

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions