Skip to content

fix(naughty): honor beautiful.notification_border_width (fixes #3786)#4106

Open
JimmyCozza wants to merge 1 commit into
awesomeWM:masterfrom
JimmyCozza:fix-naughty-border-width
Open

fix(naughty): honor beautiful.notification_border_width (fixes #3786)#4106
JimmyCozza wants to merge 1 commit into
awesomeWM:masterfrom
JimmyCozza:fix-naughty-border-width

Conversation

@JimmyCozza

Copy link
Copy Markdown
Contributor

Fixes #3786beautiful.notification_border_width is ignored because
naughty.config.defaults carries a hardcoded border_width = dpi(1).
The notification getter returns that default before the rendering code
checks the theme variable.

Remove border_width from the defaults table and add the dpi(1)
fallback at the two rendering sites (naughty.container.background and
naughty.layout.legacy), after the beautiful lookup.

Includes a regression test (tests/test-naughty-border.lua) covering
theme value, explicit override, and the dpi(1) fallback.

…eWM#3786)

The hardcoded default in naughty.config.defaults shadowed the theme
variable. Move the dpi(1) fallback to the rendering sites so
beautiful.notification_border_width is consulted first.
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.42%. Comparing base (c104846) to head (1d91d18).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4106   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files         940      941    +1     
  Lines       60290    60322   +32     
  Branches     1139     1139           
=======================================
+ Hits        54516    54548   +32     
  Misses       5268     5268           
  Partials      506      506           
Files with missing lines Coverage Δ
lib/naughty/constants.lua 100.00% <ø> (ø)
lib/naughty/container/background.lua 80.43% <100.00%> (+3.16%) ⬆️
lib/naughty/core.lua 97.43% <ø> (ø)
lib/naughty/layout/legacy.lua 91.58% <100.00%> (+0.05%) ⬆️
lib/naughty/notification.lua 94.90% <ø> (ø)
tests/test-naughty-border.lua 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't set notification borders with theme.notification_border_width and theme.notification_border_color

1 participant