feat(terra): launcher most-used sort, power buttons, SUPER opens rail

- Launcher sorts by launch count by default (persisted in quickshell's
  state dir); Ctrl+S or the sort chip toggles A–Z.
- Logout/Reboot/Shutdown in the footer, each needing a confirming click.
- SUPER now opens the launcher with the rail expanded; closing the
  launcher collapses the rail again unless it was already open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 01:26:44 +02:00
co-authored by Claude Opus 5.5
parent f84611bc6e
commit 896368ef56
5 changed files with 186 additions and 24 deletions
@@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
@@ -147,6 +148,40 @@ Scope {
onPressed: shell.toggle()
}
// SUPER — the launcher over an expanded rail, opened and closed as one.
GlobalShortcut {
name: "command"
description: "Open the launcher with the hyprchrome bar expanded"
onPressed: shell.toggleCommand()
}
// Whether the rail was expanded BY toggleCommand, so closing the launcher
// only collapses a rail it opened.
property bool commandExpanded: false
function toggleCommand() {
if (polkit.prompting || askpass.active)
return;
if (launcher.active) {
launcher.close();
return;
}
shell.commandExpanded = !shell.expanded;
shell.expanded = true;
launcher.active = true;
}
// The launcher closes itself (ESC, launch, click-off), so collapse follows it.
Connections {
target: launcher
function onActiveChanged() {
if (!launcher.active && shell.commandExpanded) {
shell.commandExpanded = false;
shell.expanded = false;
}
}
}
// Backdrop first: it is a layer below the bar, so stacking does not depend
// on creation order, but keeping the declaration order the same as the
// visual order costs nothing.
@@ -236,7 +271,7 @@ Scope {
screen: shell.focusedScreen
}
// Primary application launcher — SUPER_L. Migrated out of
// Primary application launcher — SUPER_L (via `command` above). Migrated out of
// widgets/launcher/; the ten remaining variants are still evaluation copies
// and stay in shell.qml. Declared after the bar for the same reason the
// prompt is: while it is open the bar is on Overlay too, and there is no