Examples and some fixies

This commit is contained in:
Sergey Naumov
2015-12-30 21:05:00 +03:00
parent e8a1a9777c
commit 1a9aacd5a2
3 changed files with 57 additions and 6 deletions

22
examples/workspaces.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include <iostream>
#include <i3ipc++/ipc.hpp>
int main() {
i3ipc::I3Connection conn;
for (auto& w : conn.get_workspaces()) {
std::cout << '#' << std::hex << w.num << std::dec
<< "\n\tName: " << w.name
<< "\n\tVisible: " << w.visible
<< "\n\tFocused: " << w.focused
<< "\n\tUrgent: " << w.urgent
<< "\n\tRect: "
<< "\n\t\tX: " << w.rect.x
<< "\n\t\tY: " << w.rect.y
<< "\n\t\tWidth: " << w.rect.width
<< "\n\t\tHeight: " << w.rect.height
<< "\n\tOutput: " << w.output
<< std::endl;
}
return 0;
}