Skip to content

Commit 2a795c3

Browse files
committed
fix: awesome fix notif box
1 parent a7e7933 commit 2a795c3

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

awesome/.config/awesome/ui/notifications/notifs-popup/notification-box.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local beautiful = require("beautiful")
33
local dpi = beautiful.xresources.apply_dpi
44

55
local sutils = require("utils.shape")
6+
local futils = require("utils.funcs")
67

78
local gaps = dpi(10)
89
local function notification_box(data)
@@ -47,13 +48,16 @@ local function notification_box(data)
4748
{
4849
widget = wibox.widget.textbox,
4950
text = title,
50-
markup = "<b>" .. title .. "</b>",
51+
-- markup = "<b>" .. title .. "</b>",
5152
},
53+
forced_width = 350,
54+
forced_height = 20,
5255
})
5356

5457
local messagew = wibox.widget({
5558
widget = wibox.widget.textbox,
5659
text = message,
60+
forced_height = futils.ternary(#message > 300, 100, nil),
5761
})
5862

5963
local iconw = wibox.widget({
@@ -90,6 +94,7 @@ local function notification_box(data)
9094
margins = gaps,
9195
{
9296
layout = wibox.layout.fixed.horizontal,
97+
spacing = 10,
9398
iconw,
9499
messagew,
95100
},
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
local function ternary(cond, T, F)
2+
if cond then
3+
return T
4+
else
5+
return F
6+
end
7+
end
8+
9+
return {
10+
ternary = ternary,
11+
}

0 commit comments

Comments
 (0)