Skip to content

Commit

Permalink
Updated default CSS to include the privacy module
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider committed Oct 26, 2023
1 parent e73ea8d commit ace319b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
25 changes: 25 additions & 0 deletions resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,28 @@ label:focus {
#scratchpad.empty {
background-color: transparent;
}

#privacy {
padding: 0;
}

#privacy > box {
padding: 0;
}

#privacy-item {
padding: 0 5px;
color: white;
}

#privacy-item.screenshare {
background-color: #cf5700;
}

#privacy-item.audio-in {
background-color: #1ca000;
}

#privacy-item.audio-out {
background-color: #0069d4;
}
6 changes: 3 additions & 3 deletions src/modules/privacy/privacy_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ PrivacyItem::PrivacyItem(const Json::Value& config_,
icon_() {
switch (privacy_type) {
case util::PipewireBackend::PRIVACY_NODE_TYPE_AUDIO_INPUT:
get_style_context()->add_class("audio-in");
box_.get_style_context()->add_class("audio-in");
iconName = "waybar-privacy-audio-input-symbolic";
break;
case util::PipewireBackend::PRIVACY_NODE_TYPE_AUDIO_OUTPUT:
get_style_context()->add_class("audio-out");
box_.get_style_context()->add_class("audio-out");
iconName = "waybar-privacy-audio-output-symbolic";
break;
case util::PipewireBackend::PRIVACY_NODE_TYPE_VIDEO_INPUT:
get_style_context()->add_class("screenshare");
box_.get_style_context()->add_class("screenshare");
iconName = "waybar-privacy-screen-share-symbolic";
break;
default:
Expand Down

0 comments on commit ace319b

Please sign in to comment.