File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ local beautiful = require("beautiful")
3
3
local dpi = beautiful .xresources .apply_dpi
4
4
5
5
local sutils = require (" utils.shape" )
6
+ local futils = require (" utils.funcs" )
6
7
7
8
local gaps = dpi (10 )
8
9
local function notification_box (data )
@@ -47,13 +48,16 @@ local function notification_box(data)
47
48
{
48
49
widget = wibox .widget .textbox ,
49
50
text = title ,
50
- markup = " <b>" .. title .. " </b>" ,
51
+ -- markup = "<b>" .. title .. "</b>",
51
52
},
53
+ forced_width = 350 ,
54
+ forced_height = 20 ,
52
55
})
53
56
54
57
local messagew = wibox .widget ({
55
58
widget = wibox .widget .textbox ,
56
59
text = message ,
60
+ forced_height = futils .ternary (# message > 300 , 100 , nil ),
57
61
})
58
62
59
63
local iconw = wibox .widget ({
@@ -90,6 +94,7 @@ local function notification_box(data)
90
94
margins = gaps ,
91
95
{
92
96
layout = wibox .layout .fixed .horizontal ,
97
+ spacing = 10 ,
93
98
iconw ,
94
99
messagew ,
95
100
},
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments