feat(quickshell): dashboard drawer that drops from the bar
A drawer lowered out of the underside of the bar, painted in the hull colour and joined to it by two concave fillets so it reads as more of the hull rather than as a floating card — caelestia's dashboard idea, in the YoRHa language. Four columns divided by hairlines: operator and clock, the month with today as an inverted square, the system meters, and the active player with a hairline timeline and square transport buttons. Opened by clicking the bar's clock (which used to pin the calendar), by SUPER+I, or by `qs ipc call shell dashboard`. Escape or moving focus away closes it through a HyprlandFocusGrab; Actions.dashboardClosedAt keeps the clock click that cleared the grab from reopening it. The clock's calendar hover is suppressed while the drawer is down, since it shows the month. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
18091a7109
commit
ecc7d2884c
6 files changed
+688
-5
No files matched your search
@@ -18,6 +18,7 @@ Singleton {
|
||||
property bool sidebarOpen: false
|
||||
property bool launcherOpen: false
|
||||
property bool askOpen: false
|
||||
property bool dashboardOpen: false
|
||||
|
||||
// Seed text for the next launcher open. Lets a keybind or a script hand the
|
||||
// launcher a query it did not have to type — `qs ipc call shell prompt
|
||||
@@ -36,6 +37,15 @@ Singleton {
|
||||
// …and for the ask panel, which also takes the keyboard.
|
||||
property string askScreen: ""
|
||||
|
||||
// …and for the dashboard drawer.
|
||||
property string dashboardScreen: ""
|
||||
|
||||
// When the dashboard was last closed from outside. A click on the bar's
|
||||
// clock first clears the drawer's focus grab, which closes it, and then
|
||||
// lands on the clock, which would toggle it straight back open. A toggle
|
||||
// that arrives within a moment of a grab-close is that same click.
|
||||
property real dashboardClosedAt: 0
|
||||
|
||||
// Seed text for the next ask open. A seeded open asks straight away, so
|
||||
// `qs ipc call shell askAbout "$(wl-paste)"` is a one-shot question.
|
||||
property string askSeed: ""
|
||||
@@ -65,6 +75,19 @@ Singleton {
|
||||
}
|
||||
function closeLauncher() { root.launcherOpen = false; }
|
||||
|
||||
function toggleDashboard() {
|
||||
if (!root.dashboardOpen && Date.now() - root.dashboardClosedAt < 250)
|
||||
return;
|
||||
if (!root.dashboardOpen)
|
||||
root.dashboardScreen = root.focusedScreenName();
|
||||
root.dashboardOpen = !root.dashboardOpen;
|
||||
}
|
||||
function closeDashboard() {
|
||||
if (!root.dashboardOpen) return;
|
||||
root.dashboardOpen = false;
|
||||
root.dashboardClosedAt = Date.now();
|
||||
}
|
||||
|
||||
function toggleAsk() {
|
||||
if (!root.askOpen) {
|
||||
root.askSeed = "";
|
||||
@@ -131,6 +154,7 @@ Singleton {
|
||||
function power(): void { root.togglePowerMenu(); }
|
||||
function launcher(): void { root.toggleLauncher(); }
|
||||
function ask(): void { root.toggleAsk(); }
|
||||
function dashboard(): void { root.toggleDashboard(); }
|
||||
function askAbout(question: string): void { root.askAbout(question); }
|
||||
function prompt(seed: string): void { root.promptLauncher(seed); }
|
||||
function dmenu(inPath: string, outPath: string, prompt: string): void {
|
||||
|
||||
Reference in new issue
Block a user