The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

check if workspace is free/empty

asked 2013-08-17 15:33:46 +0000

blendi gravatar image

updated 2013-08-17 15:34:18 +0000

Hello,

how can I "ask" i3wm if one workspace is free (no apps open)?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-08-17 17:01:32 +0000

Michael gravatar image

http://i3wm.org/docs/ipc.html#workspacesreply

This information can be queried for a quick proof of concept using i3-msg -t get_workspaces

edit flag offensive delete link more

Comments

Thank you for the replay, but `i3-msg -t get_workspaces` works only with one output verry well, but if i open another one `xrandr --output HDMI1 --auto --left-of LVDS1` I've got a new empty/unused workspace on HDMI1 and `i3-msg -t get_workspaces` doesn't tell me if this workspace is empty.

blendi gravatar imageblendi ( 2013-08-17 18:19:58 +0000 )edit

if you want to get a list of opened windows for a particular workspace, you should check the tree reply: http://i3wm.org/docs/ipc.html#_tree_reply

vandannen gravatar imagevandannen ( 2013-08-18 15:11:32 +0000 )edit

Question Tools

Stats

Asked: 2013-08-17 15:33:46 +0000

Seen: 252 times

Last updated: Aug 17 '13