Skip to content

Commit ea7b9c9

Browse files
authored
docs: i3 layout command documentation (#8)
1 parent 37ddce6 commit ea7b9c9

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The docs can be found at: https://wiki.miracle-wm.org/latest/.
77
## Setup
88
```sh
99
python -m venv venv
10+
source venv/bin/activate
1011
pip install -r requirements.txt
1112
```
1213

docs/ipc/commands/layout_command.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Layout
2+
3+
Introduced in v0.4.0, the `layout` command allows users to to change the layout
4+
of the currently selected container.
5+
6+
## Example
7+
```sh
8+
miraclemsg command "layout splitv" # Set the layout to 'vertical'
9+
miraclemsg command "layout splith" # Set the layout to 'horizontal'
10+
miraclemsg command "layout toggle split" # Set the layout to 'vertical' if 'horizontal' and vice versa
11+
miraclemsg command "layout toggle tabbed splith splitv" # Cycle through the layouts in the list
12+
```
13+
14+
## Links
15+
- [i3 documentation](https://i3wm.org/docs/userguide.html#manipulating_layout)

docs/ipc/programming.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Programming
1+
# Introduction
22
On top of being able to configure miracle with a configuration, miracle also
33
opens a socket that any client can listen on and send requessts to. This socket
44
is largely in line with [i3's ipc support](https://i3wm.org/docs/ipc.html),
55
with additional support for commands provided by [sway's ipc]
66
(https://github.com/swaywm/sway/blob/master/sway/sway-ipc.7.scd).
77
In the future, miracle will extend this communication channel for its own purposes.
88

9-
## Supported Messages
9+
## Messages
1010
The following provides the list of requests that are supported:
1111

1212
-`RUN_COMMAND`
@@ -22,6 +22,9 @@ The following provides the list of requests that are supported:
2222
-`SYNC`
2323
-`GET_BINDING_STATE`
2424

25+
## Commands
26+
- [Layout](./commands/layout_command.md)
27+
2528
## Supported commands:
2629
i3 and sway support a [list of commands](https://i3wm.org/docs/userguide.html#list_of_commands).
2730

mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ nav:
3636
- configuration/workspaces.md
3737
- Programming:
3838
- ipc/programming.md
39+
- Commands:
40+
- ipc/commands/layout_command.md
3941
- Screen Sharing: screenshare.md
4042
- Mir's Built-in Configuration: configuration/mir.md
4143
- Display Configuration: configuration/display_configuration.md

0 commit comments

Comments
 (0)