-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecd8da8
commit 88d3db2
Showing
19 changed files
with
240 additions
and
225 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
struct BashCommand: Command { | ||
let bashCommand: String | ||
|
||
func run() { | ||
do { | ||
try Process.run(URL(filePath: "/bin/bash"), arguments: ["-c", bashCommand]) | ||
} catch { | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
protocol Command { | ||
func run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
struct CompositeCommand: Command { | ||
let subCommands: [Command] | ||
|
||
func run() { | ||
for command in subCommands { | ||
command.run() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
struct FocusCommand: Command { | ||
let direction: Direction | ||
|
||
enum Direction: String { | ||
case up, down, left, right | ||
|
||
case parent, child, floating, tiling, toggle_tiling_floating | ||
} | ||
|
||
func run() { | ||
// todo | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/// Syntax: | ||
/// layout (main|h_accordion|v_accordion|h_list|v_list|floating|tiling)... | ||
struct LayoutCommand: Command { | ||
let toggleTo: [Layout] | ||
enum Layout { | ||
case main | ||
case h_accordion | ||
case v_accordion | ||
case h_list | ||
case v_list | ||
case floating | ||
} | ||
|
||
func run() { | ||
// todo | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
struct ModeCommand: Command { | ||
let idToActivate: String | ||
|
||
func run() { | ||
for (modeId, mode) in config.modes { | ||
if modeId == idToActivate { | ||
mode.activate() | ||
} else { | ||
mode.deactivate() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
struct MoveThroughCommand: Command { | ||
let direction: Direction | ||
|
||
enum Direction { | ||
case left, down, up, right | ||
} | ||
|
||
func run() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
struct ReloadConfigCommand: Command { | ||
func run() { | ||
reloadConfig() | ||
refresh() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
struct WorkspaceCommand : Command { | ||
let workspaceName: String | ||
|
||
func run() { | ||
switchToWorkspace(Workspace.get(byName: workspaceName)) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.