mirror of
https://github.com/polybar/polybar.git
synced 2026-02-22 21:15:39 +00:00
@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user