Commit Graph

4 Commits

Author SHA1 Message Date
bed974bd4d waybar: pin the bar to the main monitor of the active profile
The previous fix listed both profiles' primaries, "output": ["eDP-1",
"DP-1"] -- but DP-1 is the laptop's second monitor too, so the laptop
would have got a bar on it as well as on eDP-1. No static list can express
"the main monitor" when the two machines share an output name.

Resolve it at launch instead. hypr/scripts/bar asks Hyprland for the
monitor at position 0x0 -- the main monitor in both profiles -- writes
{"output": "<name>"} to ~/.cache/waybar-output.jsonc, and execs waybar;
waybar/config.jsonc includes that fragment. autostart/services, the
bar_reload bind and the performance script all go through the wrapper, so
a reload re-resolves after docking. Signals still target the waybar
process, not the wrapper.

Verified all three paths on mainPC: the fragment pins the bar to DP-1
only, an empty fragment falls back to a bar on every output, and a
fragment naming a disconnected output maps nothing (the failure mode this
started from). Config parses on both profiles.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StGBghPW9Dm7z7uj2VNWHr
2026-09-04 16:55:33 +02:00
9e045cf096 waybar: show the bar on this machine's primary output
The deployed config pinned "output": "eDP-1", the laptop's internal
display. On the PC waybar started fine but never mapped a layer surface,
so there was no bar and SIGUSR1 had nothing to toggle. Listed both
profiles' primaries instead -- waybar skips names that are not connected,
so the one file works on the laptop and the PC.

Two bugs in the same config that this uncovered:

- bars/main.jsonc included modules/temperature.cpu.jsonc, but the file is
  temperature-cpu.jsonc, so the temperature#cpu module the bar referenced
  was silently absent.
- get_wg_status.sh ran `sudo wg show` with no tty, logging "a terminal is
  required to read the password" on every poll. Now `sudo -n`, which fails
  instantly and falls into the existing "disconnected" branch, and starts
  working as-is if a NOPASSWD rule is ever added.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StGBghPW9Dm7z7uj2VNWHr
2026-09-04 16:52:15 +02:00
1465ec6d58 fixed wifi frequency 2025-11-26 11:15:06 +01:00
c3e2e6509b init 2025-08-13 21:46:48 +02:00