fix(ui): #139 sheets size themselves; #141 waybar clicks stop reading the env
Some checks failed
Check / eval (push) Has been cancelled
Some checks failed
Check / eval (push) Has been cancelled
#139 — calcurse/doctor floated full-screen. Two faults stacked, which is why it looked like the float rules were dead: 1. Hyprland 0.55.4 silently ignores percentage `size` rules. Matrix on hardware (both orders, kitty memory off): `size 60% 65%` never applies, `size 1536 936` applies either way, configerrors empty both times. Rule order was a red herring. 2. Kitty defaults to remember_window_size=yes and replays the last OS window's size into every float — so after a tiled terminal, a sheet opens maximized. This is the Ghostty regression: Ghostty had no such memory, so fault 1 stayed invisible until #95. Fix: remember_window_size=no (floats must be deterministic) and the sheets ask for their own size — term-sheet.nix reads the focused monitor and hands kitty the px, because px in a rule cannot mean "a fraction of *this* screen" and one pair cannot serve 2560x1440 and the 1366x768 Acer (#131). Those windows keep float/center and deliberately carry no size rule. #141 — the updates click did nothing: whole-swaps hand-wrote `sh -c '$TERMINAL …'` and Waybar has no TERMINAL (home.sessionVariables → login shells only; the bar is spawned by Hyprland). Fixed at the root: `nomarchy-updates upgrade-window` opens its own window, so all five call sites name one env-free command and a theme file stops having an opinion about terminals. checks.waybar-swap-env guards the class. Bernardo asked mid-task for the update window to float — it is now the third caller of the sheet helper (com.nomarchy.updates, 45%x50%). V3 on the dev box: calendar 1536x936, doctor 1408x1008, updates 1152x720 — exactly the intended fractions, floating and centred; #141 driven under `env -i` with no TERMINAL, matching Waybar's real environment; the guard proven by reintroducing the bug. Acer V3 queued. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
let
|
||||
t = config.nomarchy.theme;
|
||||
termSheet = import ./term-sheet.nix { inherit pkgs; };
|
||||
|
||||
# Whether the keyboard-layout indicator is worth bar space, and the filter
|
||||
# that holds a whole-swap to the same answer. Contract + rationale (and
|
||||
@@ -95,13 +96,14 @@ let
|
||||
|
||||
# Opens calcurse (lightweight TUI calendar) in a floating, centered kitty
|
||||
# window — Waybar clock on-click. Distinct --class → hyprland.nix float
|
||||
# rules. Kitty is always installed (kitty.nix).
|
||||
# rules. Kitty is always installed (kitty.nix). The sheet sizes itself
|
||||
# (#139: a percentage `size` rule is silently ignored) — see term-sheet.nix.
|
||||
calendarLauncher = pkgs.writeShellScriptBin "nomarchy-calendar" ''
|
||||
if ! command -v calcurse >/dev/null 2>&1; then
|
||||
notify-send "Calendar" "calcurse isn't installed (removed from home.packages?)." 2>/dev/null
|
||||
exit 0
|
||||
fi
|
||||
exec kitty --class=com.nomarchy.calendar -e calcurse
|
||||
exec ${termSheet}/bin/nomarchy-term-sheet com.nomarchy.calendar 60 65 calcurse
|
||||
'';
|
||||
|
||||
# VPN indicator — shows a shield when a NetworkManager VPN/WireGuard
|
||||
@@ -353,7 +355,7 @@ let
|
||||
return-type = "json";
|
||||
interval = 1800;
|
||||
signal = 9;
|
||||
on-click = "${config.nomarchy.terminal} -e nomarchy-updates upgrade";
|
||||
on-click = "nomarchy-updates upgrade-window";
|
||||
};
|
||||
|
||||
# swaync notification bell + Do-Not-Disturb state. `-swb` streams JSON
|
||||
|
||||
Reference in New Issue
Block a user