2016-06-15 03:32:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
2023-11-11 02:54:18 +00:00
|
|
|
#include <array>
|
2022-01-22 19:35:37 +00:00
|
|
|
#include <functional>
|
2016-06-15 03:32:35 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
2022-01-22 19:35:37 +00:00
|
|
|
#include <type_traits>
|
2023-11-11 02:54:18 +00:00
|
|
|
#include <utility>
|
2017-01-11 02:07:28 +00:00
|
|
|
#include <vector>
|
2016-10-11 01:01:12 +00:00
|
|
|
|
2017-01-28 19:26:27 +00:00
|
|
|
#include "settings.hpp"
|
|
|
|
|
2022-01-22 19:35:37 +00:00
|
|
|
#define POLYBAR_NS namespace polybar {
|
|
|
|
#define POLYBAR_NS_END }
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2016-11-20 22:04:31 +00:00
|
|
|
#ifndef PIPE_READ
|
2016-06-15 03:32:35 +00:00
|
|
|
#define PIPE_READ 0
|
2016-11-20 22:04:31 +00:00
|
|
|
#endif
|
|
|
|
#ifndef PIPE_WRITE
|
2016-06-15 03:32:35 +00:00
|
|
|
#define PIPE_WRITE 1
|
2016-11-20 22:04:31 +00:00
|
|
|
#endif
|
|
|
|
|
2016-11-19 05:22:44 +00:00
|
|
|
POLYBAR_NS
|
2016-06-15 03:32:35 +00:00
|
|
|
|
2022-01-22 19:35:37 +00:00
|
|
|
using std::array;
|
2016-06-15 03:32:35 +00:00
|
|
|
using std::forward;
|
|
|
|
using std::function;
|
2022-01-22 19:35:37 +00:00
|
|
|
using std::make_pair;
|
|
|
|
using std::make_shared;
|
|
|
|
using std::make_unique;
|
|
|
|
using std::move;
|
|
|
|
using std::pair;
|
2016-06-15 03:32:35 +00:00
|
|
|
using std::shared_ptr;
|
2022-01-22 19:35:37 +00:00
|
|
|
using std::size_t;
|
|
|
|
using std::string;
|
|
|
|
using std::to_string;
|
2016-06-15 03:32:35 +00:00
|
|
|
using std::unique_ptr;
|
|
|
|
using std::vector;
|
|
|
|
|
2016-12-30 22:32:05 +00:00
|
|
|
using namespace std::string_literals;
|
|
|
|
|
2016-12-21 22:22:02 +00:00
|
|
|
constexpr size_t operator"" _z(unsigned long long n) {
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
|
2022-01-22 19:35:37 +00:00
|
|
|
/**
|
|
|
|
* Convert an enum to its underlying type.
|
|
|
|
*/
|
|
|
|
template <typename E>
|
|
|
|
constexpr auto to_integral(E e) {
|
|
|
|
static_assert(std::is_enum<E>::value, "only enums are supported");
|
|
|
|
return static_cast<typename std::underlying_type_t<E>>(e);
|
|
|
|
}
|
|
|
|
|
2016-11-19 05:22:44 +00:00
|
|
|
POLYBAR_NS_END
|