polybar-dwm/include/drawtypes/iconset.hpp
Patrick Yates 2dfdbd240e feat(bspwm,i3): Fuzzy-matching names for icons
Added support for fuzzy matching workspace names when assigning icons.
This feature is enabled/disabled through a new option, 'fuzzy-match'.
It is disabled by default.
2017-01-23 17:01:30 +01:00

27 lines
515 B
C++

#pragma once
#include <map>
#include "common.hpp"
#include "drawtypes/label.hpp"
#include "utils/mixins.hpp"
POLYBAR_NS
namespace drawtypes {
class iconset : public non_copyable_mixin<iconset> {
public:
void add(string id, icon_t&& icon);
bool has(const string& id);
icon_t get(const string& id, const string& fallback_id = "", bool fuzzy_match = false);
operator bool();
protected:
std::map<string, icon_t> m_icons;
};
using iconset_t = shared_ptr<iconset>;
}
POLYBAR_NS_END