workspace taskbars: More config options
- orientation - icon-size - icon-theme
This commit is contained in:
@ -63,7 +63,6 @@ class Workspace {
|
||||
std::optional<WindowRepr> closeWindow(WindowAddress const& addr);
|
||||
|
||||
void update(const std::string& workspace_icon);
|
||||
void updateTaskbar(const std::string& workspace_icon);
|
||||
|
||||
private:
|
||||
Workspaces& m_workspaceManager;
|
||||
@ -85,6 +84,8 @@ class Workspace {
|
||||
Gtk::Box m_content;
|
||||
Gtk::Label m_labelBefore;
|
||||
Gtk::Label m_labelAfter;
|
||||
|
||||
void updateTaskbar(const std::string& workspace_icon);
|
||||
};
|
||||
|
||||
} // namespace waybar::modules::hyprland
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/enums.h>
|
||||
#include <gtkmm/label.h>
|
||||
#include <json/value.h>
|
||||
|
||||
@ -46,6 +47,8 @@ class Workspaces : public AModule, public EventHandler {
|
||||
auto formatAfter() const -> std::string { return m_formatAfter; }
|
||||
auto taskbarFormatBefore() const -> std::string { return m_taskbarFormatBefore; }
|
||||
auto taskbarFormatAfter() const -> std::string { return m_taskbarFormatAfter; }
|
||||
auto taskbarIconSize() const -> int { return m_taskbarIconSize; }
|
||||
auto taskbarOrientation() const -> Gtk::Orientation { return m_taskbarOrientation; }
|
||||
|
||||
std::string getRewrite(std::string window_class, std::string window_title);
|
||||
std::string& getWindowSeparator() { return m_formatWindowSeparator; }
|
||||
@ -160,6 +163,8 @@ class Workspaces : public AModule, public EventHandler {
|
||||
bool m_taskbarWithIcon = false;
|
||||
std::string m_taskbarFormatBefore;
|
||||
std::string m_taskbarFormatAfter;
|
||||
int m_taskbarIconSize = 16;
|
||||
Gtk::Orientation m_taskbarOrientation = Gtk::ORIENTATION_HORIZONTAL;
|
||||
|
||||
std::vector<std::regex> m_ignoreWorkspaces;
|
||||
|
||||
|
||||
@ -24,6 +24,13 @@ inline std::string capitalize(const std::string& str) {
|
||||
return result;
|
||||
}
|
||||
|
||||
inline std::string toLower(const std::string& str) {
|
||||
std::string result = str;
|
||||
std::transform(result.begin(), result.end(), result.begin(),
|
||||
[](unsigned char c) { return std::tolower(c); });
|
||||
return result;
|
||||
}
|
||||
|
||||
inline std::vector<std::string> split(std::string_view s, std::string_view delimiter,
|
||||
int max_splits = -1) {
|
||||
std::vector<std::string> result;
|
||||
|
||||
Reference in New Issue
Block a user