aboutsummaryrefslogtreecommitdiff
path: root/.config/ags/lib/gtk.ts
blob: 8cd60a3b3d4abc767349bfead81dd9a3f2d3f735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Gio from "gi://Gio"
import options from "options"

const settings = new Gio.Settings({
    schema: "org.gnome.desktop.interface",
})

function gtk() {
    const scheme = options.theme.scheme.value
    settings.set_string("color-scheme", `prefer-${scheme}`)
}

export default function init() {
    options.theme.scheme.connect("changed", gtk)
    gtk()
}