From 492d151079430f9c5df23a848bfb04533df1a46c Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 14 Mar 2019 18:08:12 -0700 Subject: [PATCH] fix(pulseaudio) use case-insensitive comparison for icon lookup --- src/modules/pulseaudio.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/pulseaudio.cpp b/src/modules/pulseaudio.cpp index 0e82ead0..e2872134 100644 --- a/src/modules/pulseaudio.cpp +++ b/src/modules/pulseaudio.cpp @@ -187,8 +187,10 @@ const std::string waybar::modules::Pulseaudio::getPortIcon() const "hifi", "phone", }; + std::string nameLC = port_name_; + std::transform(nameLC.begin(), nameLC.end(), nameLC.begin(), ::tolower); for (auto const& port : ports) { - if (port_name_.find(port) != std::string::npos) { + if (nameLC.find(port) != std::string::npos) { return port; } }