From d83b830c1cd28a2ea0ded738bfef5f4033cac43a Mon Sep 17 00:00:00 2001 From: rope Date: Wed, 19 Aug 2026 19:24:23 +0100 Subject: [PATCH] hyprland: shrink the terminal scratchpad to 60% --- settings/hyprland.nix | 2 +- settings/theming.nix | 34 +++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 5225010..3f97c10 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -397,7 +397,7 @@ in name = "scratchpad-inset", match = { class = "^dev.fred.scratchpad$" }, float = true, - size = "80% 80%", + size = "60% 60%", center = true, }) diff --git a/settings/theming.nix b/settings/theming.nix index 8c4f684..0713973 100644 --- a/settings/theming.nix +++ b/settings/theming.nix @@ -461,20 +461,12 @@ let # GTK4 still needs it: libadwaita ignores gtk-theme-name, so user CSS is # the only way in, and those apps do change only on restart. install -Dm644 "$theme/gtk4.css" "$HOME/.config/gtk-4.0/gtk.css" - # Vesktop gets the same CSS twice, on purpose. - # - # quickCss is what applies with no setup, but vencord watches it with - # fs.watch on the FILE, and in practice that watcher delivers exactly one - # event per vesktop run here — every switch after the first is ignored - # until vesktop restarts. (The writes themselves are fine: a standalone - # fs.watch sees every one of these installs.) - # - # The themes directory is vencord's other watcher and it watches the - # DIRECTORY, whose inode nothing ever replaces, so it keeps firing. Enable - # "fredos" once under Vencord → Themes and switches apply live. Identical - # declarations from both sources land on the same result. + # quickCss, and ONLY quickCss. This file is a variable override layer for + # the Midnight theme — it restates :root custom properties — so it has to + # be applied after Midnight to win, and vencord injects quickCss after + # themes. Shipping the same CSS as a theme instead puts it in the same + # cascade slot as Midnight, where load order decides and we lose. install -Dm644 "$theme/vesktop.css" "$HOME/.config/vesktop/settings/quickCss.css" - install -Dm644 "$theme/vesktop.css" "$HOME/.config/vesktop/themes/fredos.css" install -Dm644 "$theme/zen.css" "$HOME/${zenChrome}/userChrome.css" # Icon theme: replace the directory contents (cheap — the tree is @@ -519,6 +511,22 @@ let fi fi + # Vesktop: the file above is always correct, but vencord watches it with + # fs.watch on the FILE and delivers one event per vesktop run here, so + # every switch after the first is ignored. (Not our writes — a standalone + # fs.watch sees all of them.) Reloading the renderer re-runs + # VencordInitFileWatchers, which re-reads quickCss and rebinds the watch. + # + # Ctrl+R is Electron's reload accelerator, and it is the same thing that + # works by hand. Cost: discord visibly reloads for a second or two on + # every switch. Delete these three lines if that annoys more than the + # stale colours do. + if ${pkgs.hyprland}/bin/hyprctl -j clients 2>/dev/null \ + | ${pkgs.jq}/bin/jq -e 'any(.[].class; test("^[Vv]esktop$"))' >/dev/null 2>&1; then + ${pkgs.hyprland}/bin/hyprctl dispatch sendshortcut 'CTRL, R, class:^([Vv]esktop)$' \ + || echo "vesktop sendshortcut failed" + fi + # Point GTK3 at this wallpaper's theme. Every wallpaper has its own theme # name, so this is always a real change: gsettings emits, the portal # forwards it, and running GTK3 apps reload the named theme — no restart,