add function to change font on the fly

This commit is contained in:
lucy 2026-01-19 13:44:25 +01:00
parent eab6135f93
commit 90b6470bc4
2 changed files with 10 additions and 5 deletions

View File

@ -6,14 +6,17 @@ Item {
IpcHandler { IpcHandler {
id: ipcHandler id: ipcHandler
target: "settings" target: "settings"
property bool generate: Settings.config.generateScheme
function setWall(newWall: string): void { function setWall(newWall: string): void {
console.log(Settings.config.generateScheme);
Settings.config.currentWall = newWall; Settings.config.currentWall = newWall;
kittyKiller.exec(kittyKiller.command); kittyKiller.startDetached();
if (generate) { if (Settings.config.generateScheme === true) {
wallustRunner.exec(wallustRunner.command); wallustRunner.startDetached();
} }
} }
function setFont(newFont: string): void {
Settings.config.font = newFont
}
} }
Process { Process {
id: wallustRunner id: wallustRunner

View File

@ -5,6 +5,7 @@ import Quickshell
import Quickshell.Io import Quickshell.Io
Singleton { Singleton {
id: settings id: settings
property alias config: settingsAdapter property alias config: settingsAdapter
onConfigChanged: { onConfigChanged: {
@ -15,6 +16,7 @@ Singleton {
id: settingsView id: settingsView
onAdapterUpdated: writeAdapter() onAdapterUpdated: writeAdapter()
onFileChanged: reload()
path: "/home/lucy/.config/quickshell/settings/config.json" path: "/home/lucy/.config/quickshell/settings/config.json"
watchChanges: true watchChanges: true