feat(i3): Conditional wrap around on scroll

Ref #242
This commit is contained in:
Michael Carlberg
2016-12-14 00:46:33 +01:00
parent 809e5748b6
commit f4529dde99
5 changed files with 50 additions and 12 deletions

View File

@ -12,6 +12,18 @@
POLYBAR_NS
namespace i3_util {
/**
* Get currently focused workspace
*/
shared_ptr<workspace_t> focused_workspace(const connection_t& conn) {
for (auto&& ws : conn.get_workspaces()) {
if (ws->focused) {
return ws;
}
}
return nullptr;
}
/**
* Get all i3 root windows
*/