-
-
Notifications
You must be signed in to change notification settings - Fork 728
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Viktar Lukashonak <[email protected]>
- Loading branch information
1 parent
5f26051
commit 42d5ef3
Showing
146 changed files
with
1,889 additions
and
2,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
#pragma once | ||
|
||
#include <glibmm/markup.h> | ||
#include <gtkmm/label.h> | ||
#include <json/json.h> | ||
|
||
#include <chrono> | ||
|
||
#include "AModule.hpp" | ||
|
||
namespace waybar { | ||
|
||
class ALabel : public AModule { | ||
public: | ||
ALabel(const Json::Value &, const std::string &, const std::string &, const std::string &format, | ||
uint16_t interval = 0, bool ellipsize = false, bool enable_click = false, | ||
bool enable_scroll = false); | ||
virtual ~ALabel() = default; | ||
auto update() -> void override; | ||
virtual std::string getIcon(uint16_t, const std::string &alt = "", uint16_t max = 0); | ||
virtual std::string getIcon(uint16_t, const std::vector<std::string> &alts, uint16_t max = 0); | ||
operator Gtk::Widget &() override; | ||
|
||
protected: | ||
Gtk::Label label_; | ||
ALabel(const Json::Value &, const std::string &, const std::string &, const std::string &format, | ||
uint16_t interval = 0, bool ellipsize = false, bool enable_click = false, | ||
bool enable_scroll = false); | ||
|
||
std::string format_; | ||
Gtk::Label label_; | ||
const std::chrono::seconds interval_; | ||
bool alt_ = false; | ||
std::string default_format_; | ||
|
||
bool handleToggle(GdkEventButton *const &e) override; | ||
void handleToggle(int n_press, double dx, double dy) override; | ||
virtual std::string getState(uint8_t value, bool lesser = false); | ||
|
||
std::map<std::string, GtkMenuItem *> submenus_; | ||
std::map<std::string, std::string> menuActionsMap_; | ||
static void handleGtkMenuEvent(GtkMenuItem *menuitem, gpointer data); | ||
}; | ||
|
||
} // namespace waybar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#pragma once | ||
|
||
#include <json/json.h> | ||
|
||
#include <AModule.hpp> | ||
|
||
namespace waybar { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.