-
Notifications
You must be signed in to change notification settings - Fork 3
/
landscape.jsx
35 lines (28 loc) · 1.03 KB
/
landscape.jsx
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
import { run } from 'uebersicht'
const refreshFrequency = false;
function selectSpace(ws) {
run(`/usr/local/bin/yabai -m space --focus ${ws} && /usr/local/bin/landscape`)
}
function addSpace(ws) {
run(`/usr/local/bin/yabai -m space --create && /usr/local/bin/yabai -m space --focus ${ws} && /usr/local/bin/landscape`)
}
function deleteSpace() {
run(`/usr/local/bin/yabai -m space --destroy && /usr/local/bin/landscape`)
}
const render = () => {
return (
<div class="screen">
<link rel="stylesheet" type="text/css" href="/landscape/landscape.css" />
<link rel="stylesheet" type="text/css" href="/landscape/.cache/current.css" />
<div class="landscape">
<ul>
<li class="ls1" onClick={function() { selectSpace(1) } }></li>
<li class="ls2" onClick={function() { selectSpace(2) } }></li>
<li class="ls3" onClick={function() { selectSpace(3) } }></li>
<li class="add" onClick={function() { addSpace(4) } } onContextMenu={function() { deleteSpace() } }>+</li>
</ul>
</div>
</div>
)
};
export { refreshFrequency, render };