Skip to content

Commit 9feda03

Browse files
committed
Add tinge as submodule
- Add tinge - Remove rang and logger.hpp - Add script for updating modules
1 parent 12e15ff commit 9feda03

File tree

8 files changed

+14
-793
lines changed

8 files changed

+14
-793
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "modules/tinge"]
2+
path = modules/tinge
3+
url = https://github.com/Jackojc/tinge

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CC=g++
22
STD=c++17
33

4-
INCLUDE=-Isrc -I.
4+
INCLUDE=-Isrc -I. -Imodules/tinge/
55
LIBS=-pthread -lstdc++fs -lxcb -lxcb-util -lxcb-icccm -lxcb-randr
66

77
BUILD_DIR=build

main.cpp

+4-12
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <string>
88
#include <stdexcept>
99

10+
#include <tinge.hpp>
1011
#include <util/xcb.hpp>
11-
#include <util/logger.hpp>
1212

1313
namespace fluke {
1414
// hack
@@ -137,17 +137,9 @@ namespace fluke {
137137
138138
(GetGeometry, GetWindowAttributes) -> (get_geometry_reply_t, get_window_attributes_reply_t)
139139
*/
140-
141-
// template <typename... Xs>
142-
// auto get_impl(auto&& x) const {
143-
144-
// }
145-
146140
auto get() const {
147141
return std::apply([] (auto&&... args) {
148-
return std::tuple([] (auto&& x) {
149-
return x.get();
150-
}(args)...);
142+
return std::tuple(args.get()...);
151143
}, requests);
152144
}
153145
};
@@ -163,7 +155,7 @@ namespace fluke {
163155
int main(int argc, const char* argv[]) {
164156

165157
if (argc < 2) {
166-
fluke::errorln_em("error: ", "no window specified!");
158+
tinge::errorln_em("error: ", "no window specified!");
167159
return 1;
168160
}
169161

@@ -190,7 +182,7 @@ int main(int argc, const char* argv[]) {
190182

191183

192184
} catch (const std::exception& e) {
193-
fluke::errorln_em("error: ", e.what());
185+
tinge::errorln_em("error: ", e.what());
194186
return 1;
195187
}
196188

0 commit comments

Comments
 (0)