quickshell lets gooo

This commit is contained in:
zastian@mrthoddata.com
2025-06-17 18:54:28 +01:00
parent 8d618a8ae3
commit 040bc459a4
124 changed files with 11667 additions and 83 deletions

View File

@@ -0,0 +1,65 @@
import "root:/widgets"
import "root:/services"
import Quickshell
import Quickshell.Io
Scope {
id: root
property bool launcherInterrupted
CustomShortcut {
name: "showall"
description: "Toggle launcher, dashboard and osd"
onPressed: {
const v = Visibilities.getForActive();
v.launcher = v.dashboard = v.osd = !(v.launcher || v.dashboard || v.osd);
}
}
CustomShortcut {
name: "session"
description: "Toggle session menu"
onPressed: {
const visibilities = Visibilities.getForActive();
visibilities.session = !visibilities.session;
}
}
CustomShortcut {
name: "launcher"
description: "Toggle launcher"
onPressed: root.launcherInterrupted = false
onReleased: {
if (!root.launcherInterrupted) {
const visibilities = Visibilities.getForActive();
visibilities.launcher = !visibilities.launcher;
}
root.launcherInterrupted = false;
}
}
CustomShortcut {
name: "launcherInterrupt"
description: "Interrupt launcher keybind"
onPressed: root.launcherInterrupted = true
}
IpcHandler {
target: "drawers"
function toggle(drawer: string): void {
if (list().split("\n").includes(drawer)) {
const visibilities = Visibilities.getForActive();
visibilities[drawer] = !visibilities[drawer];
} else {
console.warn(`[IPC] Drawer "${drawer}" does not exist`);
}
}
function list(): string {
const visibilities = Visibilities.getForActive();
return Object.keys(visibilities).filter(k => typeof visibilities[k] === "boolean").join("\n");
}
}
}