From: martin f. krafft Date: Mon, 20 Jun 2022 04:29:02 +0000 (+0200) Subject: remove pap remnants from notify title X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/ae4052a4cac0b8608497d53c8a8f9e11110e329c?hp=83a938857fe5f2b5872b13553931031699e73073 remove pap remnants from notify title --- diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index fc513be..367f143 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -943,16 +943,18 @@ awful.key({ cmdkey }, "Down", function () awful.spawn("pap next") end), awful.key({ cmdkey }, "Right", function () awful.spawn("pap seek +10") end), awful.key({ cmdkey, "Shift" }, "Right", function () awful.spawn("pap seek +60") end), awful.key({ cmdkey }, "space", function () awful.spawn("pap pause") end), -awful.key({ cmdkey }, "\\", function () run_output_notify("pap info") end), -awful.key({ cmdkey }, "]", function () run_output_notify("pap list") end) +awful.key({ cmdkey }, "\\", function () run_output_notify("pap info", "Track info") end), +awful.key({ cmdkey }, "]", function () run_output_notify("pap list", "Playlist") end) ) -function run_output_notify(cmd) +function run_output_notify(cmd, title) awful.spawn.easy_async(cmd, function(stdout, stderr, reason, exit_code) - naughty.notify({ - preset = naughty.config.presets.low, - title = "Playlist", - text = stdout}) + if #stdout > 1 then + naughty.notify({ + preset = naughty.config.presets.low, + title = title, + text = stdout}) + end end) end