-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowHints.js
More file actions
33 lines (31 loc) · 2.24 KB
/
Copy pathWindowHints.js
File metadata and controls
33 lines (31 loc) · 2.24 KB
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
function catalog() {
return [
{ id: "close", slot: "caption-close", chord: "SUPER + W", label: "Close", priority: 100 },
{ id: "fullscreen", slot: "caption-max", chord: "SUPER + F", label: "Full screen", priority: 90 },
{ id: "float", slot: "caption-float", chord: "SUPER + T", label: "Float", priority: 80 },
{ id: "scratchpad", slot: "caption-min", chord: "SUPER ALT + S", label: "Scratchpad", priority: 50 },
{ id: "pin", slot: "caption-pin", chord: "SUPER + O", label: "Pin", priority: 55 },
{ id: "expand-left", slot: "edge-left", chord: "SUPER + MINUS", label: "Grow left", priority: 85 },
{ id: "grow-right", slot: "edge-right", chord: "SUPER + EQUAL", label: "Grow right", priority: 85 },
{ id: "shrink-up", slot: "edge-top", chord: "SUPER SHIFT + MINUS", label: "Shrink up", priority: 75 },
{ id: "grow-down", slot: "edge-bottom", chord: "SUPER SHIFT + EQUAL", label: "Grow down", priority: 75 },
{ id: "focus-left", slot: "outside-left", chord: "SUPER + LEFT", label: "Focus left", priority: 70 },
{ id: "focus-right", slot: "outside-right", chord: "SUPER + RIGHT", label: "Focus right", priority: 70 },
{ id: "focus-up", slot: "outside-top", chord: "SUPER + UP", label: "Focus up", priority: 70 },
{ id: "focus-down", slot: "outside-bottom", chord: "SUPER + DOWN", label: "Focus down", priority: 70 },
{ id: "swap-left", slot: "outside-left-alt", chord: "SUPER SHIFT + LEFT", label: "Swap left", priority: 40 },
{ id: "swap-right", slot: "outside-right-alt", chord: "SUPER SHIFT + RIGHT", label: "Swap right", priority: 40 },
{ id: "swap-up", slot: "outside-top-alt", chord: "SUPER SHIFT + UP", label: "Swap up", priority: 40 },
{ id: "swap-down", slot: "outside-bottom-alt", chord: "SUPER SHIFT + DOWN", label: "Swap down", priority: 40 },
{ id: "split", slot: "center", chord: "SUPER + J", label: "Split", priority: 35 },
{ id: "move", slot: "titlebar", chord: "SUPER + LEFT MOUSE BUTTON", label: "Move", priority: 45 }
]
}
function byPriority(hints) {
var copy = (hints || []).slice()
copy.sort(function (a, b) { return (b.priority || 0) - (a.priority || 0) })
return copy
}
if (typeof module !== "undefined" && module.exports) {
module.exports = { catalog: catalog, byPriority: byPriority }
}