Merge branch 'master' into feature/module-brightness

This commit is contained in:
Alex 2019-02-21 15:29:17 +01:00 committed by GitHub
commit afbf2de1b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View File

@ -6,7 +6,7 @@ services:
env: env:
- distro: debian - distro: debian
- distro: archlinux - distro: archlinux
- distro: opensuse # - distro: opensuse
before_install: before_install:
- docker pull alexays/waybar:${distro} - docker pull alexays/waybar:${distro}

View File

@ -12,6 +12,7 @@ window#waybar {
color: white; color: white;
} }
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 5px;
background: transparent; background: transparent;

View File

@ -202,14 +202,16 @@ auto waybar::modules::Pulseaudio::update() -> void
format = format =
config_["format-muted"].isString() ? config_["format-muted"].asString() : format; config_["format-muted"].isString() ? config_["format-muted"].asString() : format;
label_.get_style_context()->add_class("muted"); label_.get_style_context()->add_class("muted");
} else if (port_name_.find("a2dp_sink") != std::string::npos) { } else {
label_.get_style_context()->remove_class("muted");
if (port_name_.find("a2dp_sink") != std::string::npos) {
format = config_["format-bluetooth"].isString() format = config_["format-bluetooth"].isString()
? config_["format-bluetooth"].asString() : format; ? config_["format-bluetooth"].asString() : format;
label_.get_style_context()->add_class("bluetooth"); label_.get_style_context()->add_class("bluetooth");
} else { } else {
label_.get_style_context()->remove_class("muted");
label_.get_style_context()->remove_class("bluetooth"); label_.get_style_context()->remove_class("bluetooth");
} }
}
label_.set_markup( label_.set_markup(
fmt::format(format, fmt::arg("volume", volume_), fmt::format(format, fmt::arg("volume", volume_),
fmt::arg("icon", getIcon(volume_, getPortIcon())))); fmt::arg("icon", getIcon(volume_, getPortIcon()))));