52 lines
1.1 KiB
QML
52 lines
1.1 KiB
QML
import Quickshell
|
|
import Quickshell.Io
|
|
import qs.settings
|
|
|
|
IpcHandler {
|
|
id: ipcHandler
|
|
target: "config"
|
|
function setFont(newFont: string) {
|
|
Config.font = newFont;
|
|
}
|
|
|
|
function setIconSize(newSize: int) {
|
|
Config.iconSize = newSize;
|
|
}
|
|
|
|
function setFontSize(newSize: int) {
|
|
Config.fontSize = newSize;
|
|
}
|
|
|
|
function setHeight(newHeight: int) {
|
|
Config.barHeight = newHeight;
|
|
}
|
|
|
|
function toggleFloating() {
|
|
Config.floating = !Config.floating;
|
|
}
|
|
|
|
function setRounding(newRounding: int) {
|
|
Config.rounding = newRounding;
|
|
}
|
|
|
|
function setOpacity(newOpacity: double) {
|
|
Config.opacity = newOpacity;
|
|
}
|
|
|
|
function floating(toggle: bool) {
|
|
Config.floating = toggle
|
|
}
|
|
function reload(hard: bool) {
|
|
Quickshell.reload(hard)
|
|
}
|
|
|
|
function setWall(newWall: string) {
|
|
if (newWall.startsWith("/")) {
|
|
Config.wallpaper = "file://" + newWall;
|
|
return;
|
|
} else if (newWall.startsWith("~")) {
|
|
Config.wallpaper = Quickshell.env("HOME") + newWall;
|
|
return;
|
|
}
|
|
}
|
|
}
|