1package soy.iko.opencode
3import android.os.Bundle
4import androidx.activity.ComponentActivity
5import androidx.activity.compose.setContent
6import androidx.activity.enableEdgeToEdge
7import androidx.compose.foundation.isSystemInDarkTheme
8import androidx.compose.runtime.getValue
9import androidx.lifecycle.compose.collectAsStateWithLifecycle
10import soy.iko.opencode.data.repo.ThemeMode
11import soy.iko.opencode.ui.OpencodeApp as OpencodeAppUi
12import soy.iko.opencode.ui.theme.OpencodeTheme
14class MainActivity : ComponentActivity() {
15 override fun onCreate(savedInstanceState: Bundle?) {
16 super.onCreate(savedInstanceState)
18 val container = (application as OpencodeApp).container
20 val themeMode by container.settingsStore.themeMode
21 .collectAsStateWithLifecycle(initialValue = ThemeMode.SYSTEM)
22 val dynamicColor by container.settingsStore.dynamicColor
23 .collectAsStateWithLifecycle(initialValue = true)
24 val dark = when (themeMode) {
25 ThemeMode.SYSTEM -> isSystemInDarkTheme()
26 ThemeMode.LIGHT -> false
27 ThemeMode.DARK -> true
29 OpencodeTheme(darkTheme = dark, dynamicColor = dynamicColor) {
30 OpencodeAppUi(container = container)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list