-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
37 lines (32 loc) · 864 Bytes
/
index.tsx
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
import { BetterTmuxConfig, Box, WindowConfig, useTheme } from 'better-tmux'
import { Clock, Hostname } from 'better-tmux/widgets'
const Window = ({ type, number, name }: WindowConfig) => {
const theme = useTheme()
return (
<Box
padding={1}
bg={type === 'active' ? theme.primary : theme.background}
fg={type === 'active' ? theme.background : theme.foreground}
>
{number}: {name}
</Box>
)
}
const CustomStatusLeft = () => {
const theme = useTheme()
return (
<Box>
<Hostname />
<Box bg={theme.primary} padding={1}>🚀</Box>
<Box bg={theme.background} fg={theme.foreground} padding={1}>Test</Box>
</Box>
)
}
export default {
theme: 'nord',
status: {
left: <CustomStatusLeft />,
right: <Clock />
},
window: (window) => <Window {...window} />
} satisfies BetterTmuxConfig