X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/bcd37ae4ae4f0e5d11ab6d8f6a9580e840447327..87b323bd06e0d7e4f6e4eca3dee9990d3662b7c5:/widgets/mpd.lua?ds=sidebyside diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 5a4e534..ce48014 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -11,6 +11,7 @@ local helpers = require("lain.helpers") local async = require("lain.asyncshell") local escape_f = require("awful.util").escape +local focused = require("awful.screen").focused local naughty = require("naughty") local wibox = require("wibox") @@ -118,12 +119,13 @@ local function worker(args) end if followtag then - mpd_notification_preset.screen = awful.screen.focused() + mpd_notification_preset.screen = focused() end mpd.id = naughty.notify({ preset = mpd_notification_preset, - icon = current_icon, + icon = os.execute(string.format("ls %s &> /dev/null", current_icon)) + and current_icon, replaces_id = mpd.id, }).id end