Skip to content

Commit 182f803

Browse files
committed
customizable popup width
1 parent 2e42269 commit 182f803

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mpris-widget/init.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ local function worker(user_args)
188188
local play_icon = args.play_icon or path_to_icons .. "/symbolic/actions/media-playback-start-symbolic.svg"
189189
local stop_icon = args.stop_icon or path_to_icons .. "/symbolic/actions/media-playback-stop-symbolic.svg"
190190
local library_icon = args.library_icon or path_to_icons .. "/symbolic/places/folder-music-symbolic.svg"
191+
local popup_width = args.popup_width or 300
191192

192193
local icon = wibox.widget {
193194
widget = wibox.widget.imagebox,
@@ -230,15 +231,15 @@ local function worker(user_args)
230231
local cover_art_widget = wibox.widget {
231232
widget = wibox.widget.imagebox,
232233
forced_height = 0,
233-
forced_width = 300,
234+
forced_width = popup_width,
234235
resize_allowed = true,
235236
}
236237

237238
local metadata_widget = wibox.widget {
238239
widget = wibox.widget.textbox,
239240
font = font,
240241
forced_height = 100,
241-
forced_width = 300,
242+
forced_width = popup_width,
242243
}
243244

244245
local update_metadata = function(meta)
@@ -253,7 +254,7 @@ local function worker(user_args)
253254

254255
if art_url ~= nil and art_url ~= "" then
255256
cover_art_widget.image = art_url
256-
cover_art_widget.forced_height = 300
257+
cover_art_widget.forced_height = popup_width
257258
else
258259
cover_art_widget.image = nil
259260
cover_art_widget.forced_height = 0

0 commit comments

Comments
 (0)