-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
38c74a0
commit dff8dc4
Showing
10 changed files
with
449 additions
and
105 deletions.
There are no files selected for viewing
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,113 @@ | ||
[config] | ||
after-startup-command = 'bash if [ $hostname == "NVC00112" ]; then aerospace binding nvc; else aerospace binding bobko-macbook; fi' | ||
use-padding-for-nested-containers-with-the-same-orientation = true | ||
auto-flatten-containers = true | ||
# auto-different-orientation-for-nested-containers = true | ||
# start-at-login = true | ||
floating-windows-on-top = true | ||
|
||
[mode.main.binding] | ||
alt-enter = 'bash open /System/Applications/Utilities/Terminal.app' | ||
|
||
alt-shift-quote = 'focus child' | ||
alt-quote = 'focus parent' | ||
alt-slash = 'layout toggle h_list v_list' | ||
alt-comma = 'layout toggle h_accordion v_accordion' | ||
|
||
# todo focus floating binding | ||
|
||
# Focus window | ||
alt-k = ['focus tiling', 'focus up'] | ||
alt-h = ['focus tiling', 'focus left'] | ||
alt-j = ['focus tiling', 'focus down'] | ||
alt-l = ['focus tiling', 'focus right'] | ||
|
||
# Move window | ||
alt-shift-k = 'move_through up' | ||
alt-shift-h = 'move_through left' | ||
alt-shift-j = 'move_through down' | ||
alt-shift-l = 'move_through right' | ||
|
||
# Resize window | ||
alt-shift-minus = 'resize shrink height 2 px' | ||
alt-shift-equal = 'resize grow height 2 px' | ||
alt-shift-comma = 'resize shrink width 2 px' | ||
alt-shift-period = 'resize grow width 2 px' | ||
|
||
alt-0 = 'workspace 000' | ||
alt-1 = 'workspace 111' | ||
alt-2 = 'workspace 222' | ||
alt-3 = 'workspace 333' | ||
alt-4 = 'workspace 444' | ||
alt-5 = 'workspace 555' | ||
alt-6 = 'workspace 666' | ||
alt-7 = 'workspace 777' | ||
alt-8 = 'workspace 888' | ||
alt-9 = 'workspace 999' | ||
alt-a = 'workspace AAA' | ||
alt-b = 'workspace BBB' | ||
alt-c = 'workspace CCC' | ||
alt-d = 'workspace DDD' | ||
alt-e = 'workspace EEE' | ||
alt-f = 'workspace FFF' | ||
alt-g = 'workspace GGG' | ||
alt-i = 'workspace III' | ||
alt-m = 'workspace MMM' | ||
alt-n = 'workspace NNN' | ||
alt-o = 'workspace OOO' | ||
alt-p = 'workspace PPP' | ||
alt-q = 'workspace QQQ' | ||
alt-r = 'workspace RRR' | ||
alt-s = 'workspace SSS' | ||
alt-t = 'workspace TTT' | ||
alt-u = 'workspace UUU' | ||
alt-v = 'workspace VVV' | ||
alt-w = 'workspace WWW' | ||
alt-x = 'workspace XXX' | ||
alt-y = 'workspace YYY' | ||
alt-z = 'workspace ZZZ' | ||
|
||
alt-shift-0 = 'move container to workspace 000' | ||
alt-shift-1 = 'move container to workspace 111' | ||
alt-shift-2 = 'move container to workspace 222' | ||
alt-shift-3 = 'move container to workspace 333' | ||
alt-shift-4 = 'move container to workspace 444' | ||
alt-shift-5 = 'move container to workspace 555' | ||
alt-shift-6 = 'move container to workspace 666' | ||
alt-shift-7 = 'move container to workspace 777' | ||
alt-shift-8 = 'move container to workspace 888' | ||
alt-shift-9 = 'move container to workspace 999' | ||
alt-shift-a = 'move container to workspace AAA' | ||
alt-shift-b = 'move container to workspace BBB' | ||
alt-shift-c = 'move container to workspace CCC' | ||
alt-shift-d = 'move container to workspace DDD' | ||
alt-shift-e = 'move container to workspace EEE' | ||
alt-shift-f = 'move container to workspace FFF' | ||
alt-shift-g = 'move container to workspace GGG' | ||
alt-shift-i = 'move container to workspace III' | ||
alt-shift-m = 'move container to workspace MMM' | ||
alt-shift-n = 'move container to workspace NNN' | ||
alt-shift-o = 'move container to workspace OOO' | ||
alt-shift-p = 'move container to workspace PPP' | ||
alt-shift-q = 'move container to workspace QQQ' | ||
alt-shift-r = 'move container to workspace RRR' | ||
alt-shift-s = 'move container to workspace SSS' | ||
alt-shift-t = 'move container to workspace TTT' | ||
alt-shift-u = 'move container to workspace UUU' | ||
alt-shift-v = 'move container to workspace VVV' | ||
alt-shift-w = 'move container to workspace WWW' | ||
alt-shift-x = 'move container to workspace XXX' | ||
alt-shift-y = 'move container to workspace YYY' | ||
alt-shift-z = 'move container to workspace ZZZ' | ||
|
||
alt-tab = 'workspace back_and_forth' | ||
|
||
alt-shift-slash.alt-shift-k = 'move_in up' | ||
alt-shift-slash.alt-shift-h = 'move_in left' | ||
alt-shift-slash.alt-shift-j = 'move_in down' | ||
alt-shift-slash.alt-shift-l = 'move_in right' | ||
|
||
# aerospace config set mode.main.binding.alt-l 'focus tiling' 'focus right' | ||
# aerospace config set mode.main.binding.alt-enter 'basn alacritty' | ||
# aerospace config set mode.main.binding.alt-shift-slash.alt-shift-l 'move_in right' | ||
# aerospace config set config.start-at-login false |
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,65 @@ | ||
# Reference: https://github.com/i3/i3/blob/next/etc/config | ||
|
||
auto-flatten-containers = false | ||
|
||
[mode.main.binding] | ||
alt-enter = 'bash open /System/Applications/Utilities/Terminal.app' | ||
|
||
alt-h = 'focus left' | ||
alt-j = 'focus down' | ||
alt-k = 'focus up' | ||
alt-l = 'focus right' | ||
|
||
alt-shift-h = 'move_through left' | ||
alt-shift-j = 'move_through down' | ||
alt-shift-k = 'move_through up' | ||
alt-shift-l = 'move_through right' | ||
|
||
# alt-h = 'split h' # todo support split command? | ||
# alt-v = 'split v' # todo support split command? | ||
|
||
# alt-f = 'fullscreen' # todo support fullscreen command? | ||
|
||
alt-s = 'layout v_accordion' # 'layout stacking' in i3 | ||
alt-w = 'layout h_accordion' # 'layout tabbed' in i3 | ||
alt-e = 'layout h_list v_list' # 'layout toggle list' in i3 | ||
|
||
alt-shift-space = 'layout floating tiling' # 'floating toggle' in i3 | ||
alt-space = 'focus toggle_tiling_floating' | ||
|
||
alt-a = 'focus parent' | ||
|
||
alt-1 = 'workspace 1' | ||
alt-2 = 'workspace 2' | ||
alt-3 = 'workspace 3' | ||
alt-4 = 'workspace 4' | ||
alt-5 = 'workspace 5' | ||
alt-6 = 'workspace 6' | ||
alt-7 = 'workspace 7' | ||
alt-8 = 'workspace 8' | ||
alt-9 = 'workspace 9' | ||
alt-0 = 'workspace 10' | ||
|
||
alt-shift-1 = 'move container to workspace 1' | ||
alt-shift-2 = 'move container to workspace 2' | ||
alt-shift-3 = 'move container to workspace 3' | ||
alt-shift-4 = 'move container to workspace 4' | ||
alt-shift-5 = 'move container to workspace 5' | ||
alt-shift-6 = 'move container to workspace 6' | ||
alt-shift-7 = 'move container to workspace 7' | ||
alt-shift-8 = 'move container to workspace 8' | ||
alt-shift-9 = 'move container to workspace 9' | ||
alt-shift-0 = 'move container to workspace 10' | ||
|
||
alt-shift-c = 'reload_config' | ||
|
||
alt-r = 'mode resize' | ||
|
||
[mode.resize.binding] | ||
# todo does it work? | ||
h = 'resize shrink width 10' | ||
j = 'resize grow height 10' | ||
k = 'resize shrink height 10' | ||
l = 'resize grow width 10' | ||
enter = 'mode main' | ||
esc = 'mode esc' |
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,52 @@ | ||
import HotKey | ||
|
||
struct ConfigRoot { | ||
let config: Config | ||
let modes: [String: Mode] | ||
} | ||
|
||
struct Config { | ||
let afterStartupCommand: Command | ||
let usePaddingForNestedContainersWithTheSameOrientation: Bool | ||
let autoFlattenContainers: Bool | ||
let floatingWindowsOnTop: Bool | ||
} | ||
|
||
struct Mode { | ||
/// User visible name. Optional. todo drop it? | ||
let name: String? | ||
let bindings: [HotkeyBinding] | ||
|
||
func activate() { | ||
for binding in bindings { | ||
binding.activate() | ||
} | ||
} | ||
|
||
func deactivate() { | ||
for binding in bindings { | ||
binding.deactivate() | ||
} | ||
} | ||
} | ||
|
||
class HotkeyBinding { | ||
let modifiers: NSEvent.ModifierFlags | ||
let key: Key | ||
let command: Command | ||
private var hotKey: HotKey? = nil | ||
|
||
init(_ modifiers: NSEvent.ModifierFlags, _ key: Key, _ command: Command) { | ||
self.modifiers = modifiers | ||
self.key = key | ||
self.command = command | ||
} | ||
|
||
func activate() { | ||
hotKey = HotKey(key: key, modifiers: modifiers, keyUpHandler: command.run) | ||
} | ||
|
||
func deactivate() { | ||
hotKey = nil | ||
} | ||
} |
Oops, something went wrong.