-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskhdrc
118 lines (97 loc) · 4.33 KB
/
skhdrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# opens iTerm2
# alt - return: "${HOME}"/.skhd/scripts/open_iterm2.sh
# open Chrome
# shift + alt - return:"${HOME}"/.skhd/scripts/open_chrome.sh
# Show system statistics
fn + lalt - 1 : "${HOME}"/.skhd/scripts/show_cpu.sh
fn + lalt - 2 : "${HOME}"/.skhd/scripts/show_mem.sh
fn + lalt - 3 : "${HOME}"/.skhd/scripts/show_bat.sh
fn + lalt - 4 : "${HOME}"/.skhd/scripts/show_disk.sh
fn + lalt - 5 : "${HOME}"/.skhd/scripts/show_song.sh
# === Space ===================================
# activate or deactiavte yabai
shift + alt - s: yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end')
# === Windows ===================================
# Navigation
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - l : yabai -m window --focus east
# Equalize size of windows (平铺当前界面所有窗口)
ctrl + alt - 0 : yabai -m space --balance
# swap windows in floating mode
shift + alt - h : yabai -m window --warp west
shift + alt - j : yabai -m window --warp south
shift + alt - k : yabai -m window --warp north
shift + alt - l : yabai -m window --warp east
## Rotate windows clockwise and anticlockwise (旋转窗口)
ctrl + alt - e : yabai -m space --rotate 90
ctrl + alt - r : yabai -m space --rotate 270
# Make window native fullscreen
ctrl + alt - f : yabai -m window --toggle zoom-fullscreen
shift + alt - f : yabai -m window --toggle native-fullscreen
# Float / Unfloat window
shift + alt - space : \
yabai -m window --toggle float; \
yabai -m window --toggle border
# 把浮动窗口左右平分整个屏幕 rows:cols:start-x:star-y:width:height m行:n列:x:y:w:h
# 最大化
ctrl + alt - return : yabai -m window --grid 1:1:0:0:1:1
# 2分屏上
ctrl + alt - left : yabai -m window --grid 1:2:0:0:1:1
# 2分屏右
ctrl + alt - right : yabai -m window --grid 1:2:1:1:1:1
# 2分屏下
ctrl + alt - down : yabai -m window --grid 2:1:0:1:2:1
# 4分屏左上
ctrl + alt - u : yabai -m window --grid 2:2:0:0:1:1
# 4分屏右上
ctrl + alt - i : yabai -m window --grid 2:2:0:1:1:1
# 4分屏左下
ctrl + alt - j : yabai -m window --grid 2:2:1:0:1:1
# 4分屏右下
ctrl + alt - k : yabai -m window --grid 2:2:1:1:1:1
# 3分屏左1
ctrl + alt - d : yabai -m window --grid 1:3:0:0:1:1
# 3分屏左2
ctrl + alt - e : yabai -m window --grid 1:3:0:0:2:1
# 3分屏中1
ctrl + alt - f : yabai -m window --grid 1:3:1:0:1:1
# 3分屏右2
ctrl + alt - t : yabai -m window --grid 1:3:1:0:2:1
# 3分屏右1
ctrl + alt - g : yabai -m window --grid 1:3:3:0:1:1
# 9分屏居中
ctrl + alt - c : yabai -m window --grid 3:3:1:1:1:1
# Move focus container to workspace
# shift + alt - m : yabai -m window --space last; yabai -m space --focus last
# shift + alt - p : yabai -m window --space prev; yabai -m space --focus prev
# shift + alt - n : yabai -m window --space next; yabai -m space --focus next
# shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1
# shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2
# shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3
# shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4
# Resize windows
lctrl + alt - h : yabai -m window --resize left:-50:0; \
yabai -m window --resize right:-50:0
lctrl + alt - j : yabai -m window --resize bottom:0:50; \
yabai -m window --resize top:0:50
lctrl + alt - k : yabai -m window --resize top:0:-50; \
yabai -m window --resize bottom:0:-50
lctrl + alt - l : yabai -m window --resize right:50:0; \
yabai -m window --resize left:50:0
# Enable / Disable gaps in current workspace
# lctrl + alt - g : yabai -m space --toggle padding; yabai -m space --toggle gap
# Rotate n X and Y Axis
shift + alt - x : yabai -m space --mirror x-axis
shift + alt - y : yabai -m space --mirror y-axis
# Set insertion point for focused container
# shift + lctrl + alt - h : yabai -m window --insert west
# shift + lctrl + alt - j : yabai -m window --insert south
# shift + lctrl + alt - k : yabai -m window --insert north
# shift + lctrl + alt - l : yabai -m window --insert east
# Restart Yabai
shift + lctrl + alt - r : \
/usr/bin/env osascript <<< \
"display notification \"Restarting Yabai\" with title \"Yabai\""; \
launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"