add support for theme toggle in AGS side

This commit is contained in:
2025-05-03 06:21:15 +02:00
parent 1e6cc30ba0
commit f9e34ba18b
4 changed files with 20 additions and 8 deletions

View File

@ -5,7 +5,7 @@ import Bluetooth from "gi://AstalBluetooth";
import Hyprland from "gi://AstalHyprland";
import Network from "gi://AstalNetwork";
import { SHELL, IDLE_INHIBIT_SCRIPT, RANDOM_WALLPAPER_SCRIPT } from "@/settings.json";
import { SHELL, IDLE_INHIBIT_SCRIPT, SWITCH_THEME_SCRIPT } from "@/settings.json";
import { hideWindow, openOnButton } from "@lib/utils";
@ -118,10 +118,10 @@ export default async function QuickSettings(_monitor_id: number) {
bindingMethod={toggleIdleInhibitor.bind(null, idleInhibitorEnabled)}
/>
<Preference
icon="preferences-desktop-wallpaper-symbolic"
command={RANDOM_WALLPAPER_SCRIPT}
label="Random wallpaper"
/>
icon="applications-graphics-symbolic"
command={SWITCH_THEME_SCRIPT}
label="Switch theme"
/>
</box>
<box orientation={Gtk.Orientation.HORIZONTAL} halign={CENTER}>
<Preference