Files
hyprland/config/ags/widget/control_center/buttons/dark_mode.js
T
2024-05-18 15:14:03 +05:45

17 lines
442 B
JavaScript

import QsButton from "./qs_button.js";
import { configs } from "../../../vars.js";
export default () =>
QsButton({
icon: "night-symbolic",
label: "Dark Mode",
setup: (self) => {
self.hook(configs.theme.dark_mode, () => {
self.toggleClassName("active", configs.theme.dark_mode.value);
});
},
on_clicked: () => {
configs.theme.dark_mode.updateValue(!configs.theme.dark_mode.value);
},
});