fix: lint
parent
286a3c70f4
commit
ea38eec2af
|
@ -51,7 +51,7 @@ class Backlight : public ALabel {
|
||||||
template <class ForwardIt, class Inserter>
|
template <class ForwardIt, class Inserter>
|
||||||
static void enumerate_devices(ForwardIt first, ForwardIt last, Inserter inserter, udev *udev);
|
static void enumerate_devices(ForwardIt first, ForwardIt last, Inserter inserter, udev *udev);
|
||||||
|
|
||||||
bool handleScroll(GdkEventScroll* e);
|
bool handleScroll(GdkEventScroll *e);
|
||||||
|
|
||||||
const std::string preferred_device_;
|
const std::string preferred_device_;
|
||||||
static constexpr int EPOLL_MAX_EVENTS = 16;
|
static constexpr int EPOLL_MAX_EVENTS = 16;
|
||||||
|
|
|
@ -15,10 +15,7 @@ enum class WeeksSide {
|
||||||
HIDDEN,
|
HIDDEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class CldMode {
|
enum class CldMode { MONTH, YEAR };
|
||||||
MONTH,
|
|
||||||
YEAR
|
|
||||||
};
|
|
||||||
|
|
||||||
class Clock : public ALabel {
|
class Clock : public ALabel {
|
||||||
public:
|
public:
|
||||||
|
@ -47,9 +44,9 @@ class Clock : public ALabel {
|
||||||
WeeksSide cldWPos_{WeeksSide::HIDDEN};
|
WeeksSide cldWPos_{WeeksSide::HIDDEN};
|
||||||
std::map<int, std::string const> fmtMap_;
|
std::map<int, std::string const> fmtMap_;
|
||||||
CldMode cldMode_{CldMode::MONTH};
|
CldMode cldMode_{CldMode::MONTH};
|
||||||
uint cldMonCols_{3}; // Count of the month in the row
|
uint cldMonCols_{3}; // Count of the month in the row
|
||||||
int cldMonColLen_{20}; // Length of the month column
|
int cldMonColLen_{20}; // Length of the month column
|
||||||
int cldWnLen_{3}; // Length of the week number
|
int cldWnLen_{3}; // Length of the week number
|
||||||
date::year_month_day cldYearShift_;
|
date::year_month_day cldYearShift_;
|
||||||
date::year_month cldMonShift_;
|
date::year_month cldMonShift_;
|
||||||
date::months cldCurrShift_{0};
|
date::months cldCurrShift_{0};
|
||||||
|
@ -57,8 +54,8 @@ class Clock : public ALabel {
|
||||||
std::string cldYearCached_{};
|
std::string cldYearCached_{};
|
||||||
std::string cldMonCached_{};
|
std::string cldMonCached_{};
|
||||||
/*Calendar functions*/
|
/*Calendar functions*/
|
||||||
auto get_calendar(const date::zoned_seconds& now,
|
auto get_calendar(const date::zoned_seconds& now, const date::zoned_seconds& wtime)
|
||||||
const date::zoned_seconds& wtime) -> std::string;
|
-> std::string;
|
||||||
void cldModeSwitch();
|
void cldModeSwitch();
|
||||||
};
|
};
|
||||||
} // namespace waybar::modules
|
} // namespace waybar::modules
|
||||||
|
|
|
@ -44,18 +44,13 @@ auto waybar::modules::Image::update() -> void {
|
||||||
util::command::res output_;
|
util::command::res output_;
|
||||||
|
|
||||||
Glib::RefPtr<Gdk::Pixbuf> pixbuf;
|
Glib::RefPtr<Gdk::Pixbuf> pixbuf;
|
||||||
if(config_["path"].isString())
|
if (config_["path"].isString()) {
|
||||||
{
|
|
||||||
path_ = config_["path"].asString();
|
path_ = config_["path"].asString();
|
||||||
}
|
} else if (config_["exec"].isString()) {
|
||||||
else if(config_["exec"].isString())
|
|
||||||
{
|
|
||||||
output_ = util::command::exec(config_["exec"].asString());
|
output_ = util::command::exec(config_["exec"].asString());
|
||||||
path_ =output_.out;
|
path_ = output_.out;
|
||||||
}
|
} else {
|
||||||
else
|
path_ = "";
|
||||||
{
|
|
||||||
path_="";
|
|
||||||
}
|
}
|
||||||
if (Glib::file_test(path_, Glib::FILE_TEST_EXISTS))
|
if (Glib::file_test(path_, Glib::FILE_TEST_EXISTS))
|
||||||
pixbuf = Gdk::Pixbuf::create_from_file(path_, size_, size_);
|
pixbuf = Gdk::Pixbuf::create_from_file(path_, size_, size_);
|
||||||
|
|
Loading…
Reference in New Issue