Skip to content

Commit 6fa06b5

Browse files
committed
Rename MoveContainerToWorkspaceCommand -> MoveNodeToWorkspaceCommand
1 parent 744316a commit 6fa06b5

File tree

7 files changed

+61
-59
lines changed

7 files changed

+61
-59
lines changed

AeroSpace.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
2CC46A952773F148AC398144 /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6352ADEE6625D9703CFCA99A /* Window.swift */; };
2424
2E06134604F2510189F1FA85 /* ExecAndWaitCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9EDB8770FBA8B2E6FE91BBB /* ExecAndWaitCommand.swift */; };
2525
374CE35B85B941B8F584C113 /* FlattenWorkspaceTreeCommandTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FDECECC773EBA30661EB8A /* FlattenWorkspaceTreeCommandTest.swift */; };
26+
3774857EF024E97B7AA5DE78 /* MoveNodeToWorkspaceCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25AC44D0E9450867215FCBEC /* MoveNodeToWorkspaceCommand.swift */; };
2627
39EC2CF418F086457E900177 /* showMessageToUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14FABE2521026C8394254D97 /* showMessageToUser.swift */; };
2728
3BD6FF4CC51532977DA0C05A /* AeroAny.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82476B9BEBAC00EB9E32256F /* AeroAny.swift */; };
2829
3BE358D5C209F279BB71AC95 /* MoveInCommandTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13E5ED8E885494CAEEC70A90 /* MoveInCommandTest.swift */; };
@@ -47,7 +48,6 @@
4748
7ED8C2A66DD6F903796F090C /* TestApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2431BEAFFF1AC12D3001317A /* TestApp.swift */; };
4849
8086A22EDCDC4C906C337D0B /* resizeWithMouse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9745E5FC11701AE35712EC18 /* resizeWithMouse.swift */; };
4950
852F88894A3B9FC385563665 /* HotKey in Frameworks */ = {isa = PBXBuildFile; productRef = 42BC1E757EF69233C2262FF4 /* HotKey */; };
50-
89064BDDB5E9D17BEDE52E8C /* MoveContainerToWorkspaceCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD62043D7F5113A8BA635FDF /* MoveContainerToWorkspaceCommand.swift */; };
5151
920FDF8498DCCB62149D1719 /* Monitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6507EBAA795220FD0C05384 /* Monitor.swift */; };
5252
93D44EA41776738B4758C28D /* util.swift in Sources */ = {isa = PBXBuildFile; fileRef = 976540EBEACF846D598CD6E1 /* util.swift */; };
5353
991943D50DF9EDBF321A66F1 /* SelectorComparator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1316FFED5D1044CB693EA45 /* SelectorComparator.swift */; };
@@ -109,6 +109,7 @@
109109
1C0D40CBD65704BA9595C2FA /* keysMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = keysMap.swift; sourceTree = "<group>"; };
110110
1E81623E8954701269A22322 /* AeroSpaceApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AeroSpaceApp.swift; sourceTree = "<group>"; };
111111
2431BEAFFF1AC12D3001317A /* TestApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestApp.swift; sourceTree = "<group>"; };
112+
25AC44D0E9450867215FCBEC /* MoveNodeToWorkspaceCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveNodeToWorkspaceCommand.swift; sourceTree = "<group>"; };
112113
28B788A95DD3C267878E05B5 /* Rect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Rect.swift; sourceTree = "<group>"; };
113114
3A262B442A94C1964509B691 /* TreeNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreeNode.swift; sourceTree = "<group>"; };
114115
3A6EF465EF4129BCB10FE247 /* ExecCommandTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExecCommandTest.swift; sourceTree = "<group>"; };
@@ -160,7 +161,6 @@
160161
C848D6E57FDF22AAF0FB45E6 /* TilingContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TilingContainer.swift; sourceTree = "<group>"; };
161162
CB03A4736BC3F6D19E4E69F3 /* parseCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = parseCommand.swift; sourceTree = "<group>"; };
162163
CB371951459F8CB0137788C2 /* ResizeCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResizeCommand.swift; sourceTree = "<group>"; };
163-
CD62043D7F5113A8BA635FDF /* MoveContainerToWorkspaceCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveContainerToWorkspaceCommand.swift; sourceTree = "<group>"; };
164164
CD90FB41FD41602120F67FF5 /* Command.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Command.swift; sourceTree = "<group>"; };
165165
CF3C9038C846369FDD71D1D2 /* ReloadConfigCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReloadConfigCommand.swift; sourceTree = "<group>"; };
166166
D0EAADE8D2FB5D05FA5456B0 /* FocusCommandTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FocusCommandTest.swift; sourceTree = "<group>"; };
@@ -326,7 +326,7 @@
326326
D27A7AF7E9A049700BDE276B /* JoinWithCommand.swift */,
327327
1A2B673C67B00DBFCC27FFE7 /* LayoutCommand.swift */,
328328
4B0CD3C2A0E86CDB9DF312AB /* ModeCommand.swift */,
329-
CD62043D7F5113A8BA635FDF /* MoveContainerToWorkspaceCommand.swift */,
329+
25AC44D0E9450867215FCBEC /* MoveNodeToWorkspaceCommand.swift */,
330330
67B9FFF81EB0327ABD51A7FE /* MoveThroughCommand.swift */,
331331
0FF221FD5C0CB4163E322D6D /* MoveWorkspaceToDisplayCommand.swift */,
332332
CB03A4736BC3F6D19E4E69F3 /* parseCommand.swift */,
@@ -509,7 +509,7 @@
509509
EECC59858691B99A95542D72 /* MacWindow.swift in Sources */,
510510
6E4E235FDA41307B19F16182 /* ModeCommand.swift in Sources */,
511511
920FDF8498DCCB62149D1719 /* Monitor.swift in Sources */,
512-
89064BDDB5E9D17BEDE52E8C /* MoveContainerToWorkspaceCommand.swift in Sources */,
512+
3774857EF024E97B7AA5DE78 /* MoveNodeToWorkspaceCommand.swift in Sources */,
513513
EDFDE707B4DC5E500B1709B1 /* MoveThroughCommand.swift in Sources */,
514514
05407EA2B9AC3F9371B56E6B /* MoveWorkspaceToDisplayCommand.swift in Sources */,
515515
635733FDDF37E44364372B74 /* MruStack.swift in Sources */,

config-examples/default-config.toml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -98,39 +98,39 @@ alt-x = 'workspace X'
9898
alt-y = 'workspace Y'
9999
alt-z = 'workspace Z'
100100

101-
# See: https://github.com/nikitabobko/AeroSpace/blob/main/docs/commands.md#move-container-to-workspace
102-
alt-shift-0 = 'move-container-to-workspace 0'
103-
alt-shift-1 = 'move-container-to-workspace 1'
104-
alt-shift-2 = 'move-container-to-workspace 2'
105-
alt-shift-3 = 'move-container-to-workspace 3'
106-
alt-shift-4 = 'move-container-to-workspace 4'
107-
alt-shift-5 = 'move-container-to-workspace 5'
108-
alt-shift-6 = 'move-container-to-workspace 6'
109-
alt-shift-7 = 'move-container-to-workspace 7'
110-
alt-shift-8 = 'move-container-to-workspace 8'
111-
alt-shift-9 = 'move-container-to-workspace 9'
112-
alt-shift-a = 'move-container-to-workspace A'
113-
alt-shift-b = 'move-container-to-workspace B'
114-
alt-shift-c = 'move-container-to-workspace C'
115-
alt-shift-d = 'move-container-to-workspace D'
116-
alt-shift-e = 'move-container-to-workspace E'
117-
alt-shift-f = 'move-container-to-workspace F'
118-
alt-shift-g = 'move-container-to-workspace G'
119-
alt-shift-i = 'move-container-to-workspace I'
120-
alt-shift-m = 'move-container-to-workspace M'
121-
alt-shift-n = 'move-container-to-workspace N'
122-
alt-shift-o = 'move-container-to-workspace O'
123-
alt-shift-p = 'move-container-to-workspace P'
124-
alt-shift-q = 'move-container-to-workspace Q'
125-
alt-shift-r = 'move-container-to-workspace R'
126-
alt-shift-s = 'move-container-to-workspace S'
127-
alt-shift-t = 'move-container-to-workspace T'
128-
alt-shift-u = 'move-container-to-workspace U'
129-
alt-shift-v = 'move-container-to-workspace V'
130-
alt-shift-w = 'move-container-to-workspace W'
131-
alt-shift-x = 'move-container-to-workspace X'
132-
alt-shift-y = 'move-container-to-workspace Y'
133-
alt-shift-z = 'move-container-to-workspace Z'
101+
# See: https://github.com/nikitabobko/AeroSpace/blob/main/docs/commands.md#move-node-to-workspace
102+
alt-shift-0 = 'move-node-to-workspace 0'
103+
alt-shift-1 = 'move-node-to-workspace 1'
104+
alt-shift-2 = 'move-node-to-workspace 2'
105+
alt-shift-3 = 'move-node-to-workspace 3'
106+
alt-shift-4 = 'move-node-to-workspace 4'
107+
alt-shift-5 = 'move-node-to-workspace 5'
108+
alt-shift-6 = 'move-node-to-workspace 6'
109+
alt-shift-7 = 'move-node-to-workspace 7'
110+
alt-shift-8 = 'move-node-to-workspace 8'
111+
alt-shift-9 = 'move-node-to-workspace 9'
112+
alt-shift-a = 'move-node-to-workspace A'
113+
alt-shift-b = 'move-node-to-workspace B'
114+
alt-shift-c = 'move-node-to-workspace C'
115+
alt-shift-d = 'move-node-to-workspace D'
116+
alt-shift-e = 'move-node-to-workspace E'
117+
alt-shift-f = 'move-node-to-workspace F'
118+
alt-shift-g = 'move-node-to-workspace G'
119+
alt-shift-i = 'move-node-to-workspace I'
120+
alt-shift-m = 'move-node-to-workspace M'
121+
alt-shift-n = 'move-node-to-workspace N'
122+
alt-shift-o = 'move-node-to-workspace O'
123+
alt-shift-p = 'move-node-to-workspace P'
124+
alt-shift-q = 'move-node-to-workspace Q'
125+
alt-shift-r = 'move-node-to-workspace R'
126+
alt-shift-s = 'move-node-to-workspace S'
127+
alt-shift-t = 'move-node-to-workspace T'
128+
alt-shift-u = 'move-node-to-workspace U'
129+
alt-shift-v = 'move-node-to-workspace V'
130+
alt-shift-w = 'move-node-to-workspace W'
131+
alt-shift-x = 'move-node-to-workspace X'
132+
alt-shift-y = 'move-node-to-workspace Y'
133+
alt-shift-z = 'move-node-to-workspace Z'
134134

135135
# See: https://github.com/nikitabobko/AeroSpace/blob/main/docs/commands.md#workspace-back-and-forth
136136
alt-tab = 'workspace-back-and-forth'

config-examples/i3-like-config-example.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ alt-8 = 'workspace 8'
4646
alt-9 = 'workspace 9'
4747
alt-0 = 'workspace 10'
4848

49-
alt-shift-1 = 'move-container-to-workspace 1'
50-
alt-shift-2 = 'move-container-to-workspace 2'
51-
alt-shift-3 = 'move-container-to-workspace 3'
52-
alt-shift-4 = 'move-container-to-workspace 4'
53-
alt-shift-5 = 'move-container-to-workspace 5'
54-
alt-shift-6 = 'move-container-to-workspace 6'
55-
alt-shift-7 = 'move-container-to-workspace 7'
56-
alt-shift-8 = 'move-container-to-workspace 8'
57-
alt-shift-9 = 'move-container-to-workspace 9'
58-
alt-shift-0 = 'move-container-to-workspace 10'
49+
alt-shift-1 = 'move-node-to-workspace 1'
50+
alt-shift-2 = 'move-node-to-workspace 2'
51+
alt-shift-3 = 'move-node-to-workspace 3'
52+
alt-shift-4 = 'move-node-to-workspace 4'
53+
alt-shift-5 = 'move-node-to-workspace 5'
54+
alt-shift-6 = 'move-node-to-workspace 6'
55+
alt-shift-7 = 'move-node-to-workspace 7'
56+
alt-shift-8 = 'move-node-to-workspace 8'
57+
alt-shift-9 = 'move-node-to-workspace 9'
58+
alt-shift-0 = 'move-node-to-workspace 10'
5959

6060
alt-shift-c = 'reload-config'
6161

docs/commands.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- [join-with](#join-with)
1010
- [layout](#layout)
1111
- [mode](#mode)
12-
- [move-container-to-workspace](#move-container-to-workspace)
12+
- [move-node-to-workspace](#move-node-to-workspace)
1313
- [move-through](#move-through)
1414
- [move-workspace-to-display](#move-workspace-to-display)
1515
- [reload-config](#reload-config)
@@ -107,9 +107,10 @@ h_list
107107
└── window 3
108108
```
109109

110-
`join-with` command is supposed to be a replacement for i3's [split command](https://i3wm.org/docs/userguide.html#_splitting_containers).
111-
It seems that the only reason why you might want to split a container is to put several windows under a common "umbrella" parent.
112-
Contrary to `split`, `join-with` can be used with [enable-normalization-flatten-containers](./guide.md#normalization)
110+
> [!NOTE]
111+
> `join-with` command is supposed to be a replacement for i3's [split command](https://i3wm.org/docs/userguide.html#_splitting_containers).
112+
> It seems that the only reason why you might want to split a node is to put several windows under a common "umbrella" parent.
113+
> Contrary to `split`, `join-with` can be used with [enable-normalization-flatten-containers](./guide.md#normalization)
113114
114115
## layout
115116

@@ -132,10 +133,10 @@ mode name_of_the_target_mode
132133

133134
Activates the specified [binding mode](./guide.md#bindings-modes)
134135

135-
## move-container-to-workspace
136+
## move-node-to-workspace
136137

137138
```
138-
move-container-to-workspace target_workspace_name
139+
move-node-to-workspace target_workspace_name
139140
```
140141

141142
Moves currently focused window to the specified workspace
@@ -149,7 +150,8 @@ move-through (left|down|up|right) [floating_pixel]
149150
Moves the window in the given direction. The optional `floating_pixel` argument specifies how far the window should be moved if
150151
it is floating. The default is 50 pixels
151152

152-
This command is an analog of [i3's move command](https://i3wm.org/docs/userguide.html#move_direction)
153+
> [!NOTE]
154+
> This command is an analog of [i3's move command](https://i3wm.org/docs/userguide.html#move_direction)
153155
154156
**Example 1**
155157

src/command/MoveContainerToWorkspaceCommand.swift renamed to src/command/MoveNodeToWorkspaceCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
struct MoveContainerToWorkspaceCommand: Command {
1+
struct MoveNodeToWorkspaceCommand: Command {
22
let targetWorkspaceName: String
33

44
func runWithoutLayout() async {

src/command/parseCommand.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ func parseSingleCommand(_ raw: String) -> ParsedCommand<Command> {
2323
let firstWord = String(words.first ?? "")
2424
if firstWord == "workspace" {
2525
return parseSingleArg(args, firstWord).map { WorkspaceCommand(workspaceName: $0) }
26-
} else if firstWord == "move-container-to-workspace" {
27-
return parseSingleArg(args, firstWord).map { MoveContainerToWorkspaceCommand(targetWorkspaceName: $0) }
26+
} else if firstWord == "move-node-to-workspace" {
27+
return parseSingleArg(args, firstWord).map { MoveNodeToWorkspaceCommand(targetWorkspaceName: $0) }
2828
} else if firstWord == "mode" {
2929
return parseSingleArg(args, firstWord).map { ModeCommand(idToActivate: $0) }
3030
} else if firstWord == "join-with" {

test/command/MoveContainerToWorkspaceCommandTest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class MoveContainerToWorkspaceCommandTest: XCTestCase {
1111
}
1212

1313
XCTAssertTrue(focusedWorkspaceSourceOfTruth == .macOs)
14-
await MoveContainerToWorkspaceCommand(targetWorkspaceName: "b").runWithoutLayout()
14+
await MoveNodeToWorkspaceCommand(targetWorkspaceName: "b").runWithoutLayout()
1515
XCTAssertTrue(workspaceA.isEffectivelyEmpty)
1616
XCTAssertTrue(focusedWorkspaceSourceOfTruth == .ownModel)
1717
XCTAssertEqual((Workspace.get(byName: "b").rootTilingContainer.children.singleOrNil() as? Window)?.windowId, 1)
@@ -23,7 +23,7 @@ final class MoveContainerToWorkspaceCommandTest: XCTestCase {
2323
}
2424

2525
XCTAssertTrue(focusedWorkspaceSourceOfTruth == .macOs)
26-
await MoveContainerToWorkspaceCommand(targetWorkspaceName: "b").runWithoutLayout()
26+
await MoveNodeToWorkspaceCommand(targetWorkspaceName: "b").runWithoutLayout()
2727
XCTAssertTrue(workspaceA.isEffectivelyEmpty)
2828
XCTAssertTrue(focusedWorkspaceSourceOfTruth == .ownModel)
2929
XCTAssertEqual(Workspace.get(byName: "b").children.filterIsInstance(of: Window.self).singleOrNil()?.windowId, 1)

0 commit comments

Comments
 (0)