This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

desktops.sway: fix tab restore broken by stale SWAYSOCK + wrong restore browser

The hardcoded `export SWAYSOCK=/run/user/$(id -u)/sway-ipc.sock` in
extraSessionCommands is ignored by sway >=1.11, which creates its own per-pid
socket (sway-ipc.$uid.$pid.sock). The dead path got baked into the firefox and
workspace-manager user services, so every swaymsg call failed and the extension
silently skipped tab restore on each workspace switch. Drop the export and let
the existing import-environment propagate the real socket sway advertises.

Also:
- workspace-menu: "Restore tabs" used pkgs.firefox (upstream stable) instead of
the wrapped Dev Edition daemon, launching a separate browser/profile
- workspace-tabs: never overwrite a saved workspace with an empty tab list, so
the transient blank window after a Firefox restart can't wipe real tabs

Assisted-by: Claude Code (claude-opus-4-8[1m])

+13 -4
+3 -1
tools/workspace-manager/flake-module.nix
··· 113 113 pkgs.gnused 114 114 pkgs.coreutils 115 115 pkgs.gnugrep 116 - pkgs.firefox 116 + # The wrapped Dev Edition daemon, not upstream stable firefox — 117 + # otherwise "Restore tabs" launches a separate browser/profile. 118 + self.packages.${pkgs.system}.firefox 117 119 ]; 118 120 text = builtins.readFile ./workspace-menu.sh; 119 121 };
+5 -3
2configs/desktops/sway/default.nix
··· 57 57 programs.sway = { 58 58 enable = true; 59 59 wrapperFeatures.gtk = true; 60 - extraSessionCommands = '' 61 - export SWAYSOCK=/run/user/$(id -u)/sway-ipc.sock 62 - ''; 60 + # Do NOT hardcode SWAYSOCK here: sway >=1.11 ignores an inherited value and 61 + # creates its own per-pid socket (sway-ipc.$uid.$pid.sock). Exporting a 62 + # fixed path baked a dead socket into the firefox/workspace-manager user 63 + # services, breaking all swaymsg calls (and thus tab restore). Let sway 64 + # advertise the real socket; the import-environment below propagates it. 63 65 }; 64 66 65 67 # Enable realtime scheduling for sway
+5
tools/workspace-manager/firefox-extension/background.js
··· 196 196 active: t.active, 197 197 })); 198 198 199 + // Never overwrite a saved workspace with an empty list. A mapped window 200 + // showing only internal pages (e.g. the transient blank window right after 201 + // a Firefox restart) would otherwise wipe that workspace's real tabs. 202 + if (tabData.length === 0) return; 203 + 199 204 await sendNative("save_tabs", { workspace, tabs: tabData }); 200 205 } catch (e) { 201 206 console.error(`Failed to save tabs for ${workspace}:`, e);