aboutsummaryrefslogtreecommitdiff
path: root/.config/ags/lib/tmux.ts
blob: 1372eb2380fd434d4597dab14625cfecf7f11b6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import options from "options"
import { sh } from "./utils"

export async function tmux() {
    const { scheme, dark, light } = options.theme
    const hex = scheme.value === "dark" ? dark.primary.bg.value : light.primary.bg.value
    if (await sh("which tmux"))
        sh(`tmux set @main_accent "${hex}"`)
}

export default function init() {
    options.theme.dark.primary.bg.connect("changed", tmux)
    options.theme.light.primary.bg.connect("changed", tmux)
}