mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat(ALabel): Toggleable labels
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#include "modules/network.hpp"
|
||||
|
||||
waybar::modules::Network::Network(const Json::Value& config)
|
||||
: ALabel(config), family_(AF_INET),
|
||||
: ALabel(config, "{ifname}"), family_(AF_INET),
|
||||
signal_strength_dbm_(0), signal_strength_(0)
|
||||
{
|
||||
sock_fd_ = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
|
||||
@ -82,7 +82,7 @@ waybar::modules::Network::~Network()
|
||||
|
||||
auto waybar::modules::Network::update() -> void
|
||||
{
|
||||
auto format = config_["format"] ? config_["format"].asString() : "{ifname}";
|
||||
auto format = format_;
|
||||
if (ifid_ <= 0) {
|
||||
format = config_["format-disconnected"]
|
||||
? config_["format-disconnected"].asString() : format;
|
||||
|
Reference in New Issue
Block a user