Skip to content

Commit d54a10b

Browse files
authored
i3bar-workspace-protocol: Make examples (more) POSIX compliant (i3#6029)
See https://unix.stackexchange.com/a/581410, `read` needs a variable name. Came up in i3#5939
1 parent e020701 commit d54a10b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/i3bar-workspace-protocol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ i3-msg -t subscribe -m '["workspace", "output"]' | {
129129
# avoids having an empty bar when starting up.
130130
i3-msg -t get_workspaces;
131131
# Then, while we receive events, update the workspace information.
132-
while read; do i3-msg -t get_workspaces; done;
132+
while read EVENT; do i3-msg -t get_workspaces; done;
133133
}
134134
------------------------------
135135

@@ -139,7 +139,7 @@ i3-msg -t subscribe -m '["workspace", "output"]' | {
139139
#!/bin/sh
140140
i3-msg -t subscribe -m '["workspace", "output"]' | {
141141
i3-msg -t get_workspaces;
142-
while read; do i3-msg -t get_workspaces; done;
142+
while read EVENT; do i3-msg -t get_workspaces; done;
143143
} | jq --unbuffered -c '[ .[] | select(.name != "foo" or .focused) ]'
144144
------------------------------
145145

@@ -153,7 +153,7 @@ might mean that you are getting an empty bar until enough events are written.
153153
#!/bin/sh
154154
i3-msg -t subscribe -m '["workspace", "output"]' | {
155155
i3-msg -t get_workspaces;
156-
while read; do i3-msg -t get_workspaces; done;
156+
while read EVENT; do i3-msg -t get_workspaces; done;
157157
} | jq --unbuffered -c '
158158
def fake_ws(name): {
159159
name: name,
@@ -169,7 +169,7 @@ i3-msg -t subscribe -m '["workspace", "output"]' | {
169169
#!/bin/sh
170170
i3-msg -t subscribe -m '["workspace", "output"]' | {
171171
i3-msg -t get_workspaces;
172-
while read; do i3-msg -t get_workspaces; done;
172+
while read EVENT; do i3-msg -t get_workspaces; done;
173173
} | jq --unbuffered -c 'sort_by(.name) | reverse'
174174
------------------------------
175175

@@ -179,6 +179,6 @@ i3-msg -t subscribe -m '["workspace", "output"]' | {
179179
#!/bin/sh
180180
i3-msg -t subscribe -m '["workspace", "output"]' | {
181181
i3-msg -t get_workspaces;
182-
while read; do i3-msg -t get_workspaces; done;
182+
while read EVENT; do i3-msg -t get_workspaces; done;
183183
} | jq --unbuffered -c '[ .[] | .name |= . + " foo" ]'
184184
------------------------------

0 commit comments

Comments
 (0)