quickshell: skip hidden dirs in file search, log launcher opens
fd drops --hidden, so ~/.cache, ~/.local/share/Steam, .git trees and friends are out of the search entirely — most of the files under $HOME and none of them worth matching by name. The .git/.cache/.steam excludes go with it; node_modules is the one junk tree that isn't hidden. Also log the three points that can swallow a Super+R: the IPC handler when no bar is registered, the toggle itself, and the focus grab closing a panel the user didn't close. journalctl --user -u quickshell.
This commit is contained in:
parent
a8eb76782c
commit
bcd685f3e3
1 changed files with 41 additions and 5 deletions
|
|
@ -801,10 +801,21 @@ in
|
|||
|
||||
// Bound in hyprland.nix: Super+R → launcher (bottom of the
|
||||
// bar window), Super+L → session menu (right edge).
|
||||
// mainBar is claimed by the primary screen's Bar in its
|
||||
// Component.onCompleted. If it is somehow unset — an output
|
||||
// change recreating the Variants, a reload racing the keybind —
|
||||
// Super+R has nothing to call, and used to fail dead silently.
|
||||
// Say so instead: journalctl --user -u quickshell.
|
||||
IpcHandler {
|
||||
target: "launcher"
|
||||
function toggle(): void { if (root.mainBar) root.mainBar.toggleLauncher(); }
|
||||
function powermenu(): void { if (root.mainBar) root.mainBar.toggleSession(); }
|
||||
function toggle(): void {
|
||||
if (!root.mainBar) { console.warn("ipc launcher.toggle: no bar registered"); return; }
|
||||
root.mainBar.toggleLauncher();
|
||||
}
|
||||
function powermenu(): void {
|
||||
if (!root.mainBar) { console.warn("ipc launcher.powermenu: no bar registered"); return; }
|
||||
root.mainBar.toggleSession();
|
||||
}
|
||||
}
|
||||
|
||||
// Keybind cheat sheet — Super+C in hyprland.nix.
|
||||
|
|
@ -1557,6 +1568,11 @@ in
|
|||
|
||||
function toggle() {
|
||||
open = !open;
|
||||
// Logged so a "Super+R did nothing" can be told apart
|
||||
// from "Super+R never arrived": if the journal shows
|
||||
// `-> open` with no matching focusgrab line after it,
|
||||
// the panel really did open and something drew over it.
|
||||
console.log("launcher toggle -> " + (open ? "open" : "closed"));
|
||||
if (open) {
|
||||
searchInput.text = "";
|
||||
activeCat = "";
|
||||
|
|
@ -1616,6 +1632,13 @@ in
|
|||
// --max-results lets fd exit the moment it has enough, which
|
||||
// is what keeps this feeling instant, and results are never
|
||||
// stale the way a nightly updatedb is.
|
||||
//
|
||||
// Dotfiles and dot-directories are skipped (fd's default —
|
||||
// there is deliberately no --hidden here). That is both what
|
||||
// you want from a launcher and most of the speed: ~/.cache,
|
||||
// ~/.local/share/Steam, ~/.var and every .git tree are the
|
||||
// bulk of the files under $HOME and none of them are things
|
||||
// you search for by name.
|
||||
property var fileHits: []
|
||||
property string fdQuery: ""
|
||||
// A run cut short still flushes whatever stdout it had, and
|
||||
|
|
@ -1663,11 +1686,13 @@ in
|
|||
// new command starts as soon as the old process reaps.
|
||||
killFd();
|
||||
fdProc.command = [
|
||||
Commands.fd, "--absolute-path", "--ignore-case", "--hidden",
|
||||
Commands.fd, "--absolute-path", "--ignore-case",
|
||||
"--type", "f", "--type", "d",
|
||||
"--max-results", String(fdMax),
|
||||
"--exclude", ".git", "--exclude", ".cache", "--exclude", "node_modules",
|
||||
"--exclude", ".local/share/Steam", "--exclude", ".steam",
|
||||
// node_modules is the one big junk tree that isn't
|
||||
// hidden, so it still needs naming. The old .git /
|
||||
// .cache / .steam excludes are gone with --hidden.
|
||||
"--exclude", "node_modules",
|
||||
pat, Quickshell.env("HOME")
|
||||
];
|
||||
fdProc.running = true;
|
||||
|
|
@ -2915,6 +2940,17 @@ in
|
|||
windows: [bar]
|
||||
onCleared: {
|
||||
if (bar.screenshotPinned) return;
|
||||
// The only path that closes a panel without the user
|
||||
// asking, so it is worth a line in the journal. An app
|
||||
// spamming window-activation events as it starts clears
|
||||
// the grab exactly like a click-outside does (that is
|
||||
// what the steam_app_0 suppress_event rule in
|
||||
// hyprland.nix exists for), and only the timing tells
|
||||
// them apart — a clear within a few ms of the toggle
|
||||
// above was not a human clicking.
|
||||
if (launcherPanel.open || bar.activeDropdown !== null)
|
||||
console.log("focusgrab cleared: closing launcher="
|
||||
+ launcherPanel.open + " dropdown=" + (bar.activeDropdown !== null));
|
||||
launcherPanel.open = false;
|
||||
bar.closeAllDropdowns();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue