mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #2025 from ElyesH/master
This commit is contained in:
commit
09142fa322
@ -55,7 +55,7 @@ Gamemode::Gamemode(const std::string& id, const Json::Value& config)
|
|||||||
}
|
}
|
||||||
box_.set_spacing(iconSpacing);
|
box_.set_spacing(iconSpacing);
|
||||||
|
|
||||||
// Wether to use icon or not
|
// Whether to use icon or not
|
||||||
if (config_["use-icon"].isBool()) {
|
if (config_["use-icon"].isBool()) {
|
||||||
useIcon = config_["use-icon"].asBool();
|
useIcon = config_["use-icon"].asBool();
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf
|
|||||||
// Start with some "text" in the module's label_. update() will then
|
// Start with some "text" in the module's label_. update() will then
|
||||||
// update it. Since the text should be different, update() will be able
|
// update it. Since the text should be different, update() will be able
|
||||||
// to show or hide the event_box_. This is to work around the case where
|
// to show or hide the event_box_. This is to work around the case where
|
||||||
// the module start with no text, but the the event_box_ is shown.
|
// the module start with no text, but the event_box_ is shown.
|
||||||
label_.set_markup("<s></s>");
|
label_.set_markup("<s></s>");
|
||||||
|
|
||||||
auto bandwidth = readBandwidthUsage();
|
auto bandwidth = readBandwidthUsage();
|
||||||
|
@ -156,7 +156,7 @@ void Workspaces::onCmd(const struct Ipc::ipc_response &res) {
|
|||||||
if (l == r || config_["alphabetical_sort"].asBool()) {
|
if (l == r || config_["alphabetical_sort"].asBool()) {
|
||||||
// In case both integers are the same, lexicographical
|
// In case both integers are the same, lexicographical
|
||||||
// sort. The code above already ensure that this will only
|
// sort. The code above already ensure that this will only
|
||||||
// happend in case of explicitly numbered workspaces.
|
// happened in case of explicitly numbered workspaces.
|
||||||
//
|
//
|
||||||
// Additionally, if the config specifies to sort workspaces
|
// Additionally, if the config specifies to sort workspaces
|
||||||
// alphabetically do this here.
|
// alphabetically do this here.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
namespace waybar::util {
|
namespace waybar::util {
|
||||||
// replaces ``<>&"'`` with their encoded counterparts
|
// replaces ``<>&"'`` with their encoded counterparts
|
||||||
std::string sanitize_string(std::string str) {
|
std::string sanitize_string(std::string str) {
|
||||||
// note: it's important that '&' is replaced first; therefor we *can't* use std::map
|
// note: it's important that '&' is replaced first; therefore we *can't* use std::map
|
||||||
const std::pair<char, std::string> replacement_table[] = {
|
const std::pair<char, std::string> replacement_table[] = {
|
||||||
{'&', "&"}, {'<', "<"}, {'>', ">"}, {'"', """}, {'\'', "'"}};
|
{'&', "&"}, {'<', "<"}, {'>', ">"}, {'"', """}, {'\'', "'"}};
|
||||||
size_t startpoint;
|
size_t startpoint;
|
||||||
|
Loading…
Reference in New Issue
Block a user