From ae4052a4cac0b8608497d53c8a8f9e11110e329c Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 20 Jun 2022 06:29:02 +0200 Subject: [PATCH] remove pap remnants from notify title --- .config/awesome/rc.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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 -- 2.39.2