Files
dotfiles/hosts/sctfw004/bin/wl-primary-to-x11
T
connor e6644d0616 Rebuild dotfiles as one branch with per-host layers
Replaces the previous repo, which had split into two histories that never
met (mainframe on a dead GitLab remote, the laptops on Gitea) with 146
dirty files across three machines and the NAS never enrolled at all.

Branch-per-machine is gone. One main, with host differences expressed as
small files under hosts/<hostname>/ rather than as branches, so there is
nothing to merge. The reconciled zsh layer reduces 15-33 line forks to
1-7 effective lines per host; distro differences (oh-my-zsh prefix,
syntax-highlighting path, fd vs fdfind) are probed in common/ instead.

Fresh history: the old one carried six plaintext credentials, 45 MB of
mail caches, browser caches and vendored binaries. 5,096 tracked files
and 144 MB become 462 files and 2.6 MB. The .gitignore is now an
allowlist, which is what keeps that true.

Root cause of the rot: ~/.local/bin was a symlink to scripts/ with GOPATH
inside it, so every go install wrote into version control (2.2 GB on the
work laptop). PATH now points at the repo instead of the reverse.

Also: Hyprland replaces sway and is sourced in two halves so $browser is
defined before use; singleton automations carry ConditionHost= alongside
host-layer-only placement; ddns moves from cron to a guarded timer;
package manifests and pkg-snapshot/pkg-restore replace the X11-era
install_scripts/; networkmanager-dmenu added to system76 (the binding
always existed, the package never did).
2026-09-14 14:24:37 -04:00

16 lines
768 B
Bash
Executable File

#!/bin/sh
# Hyprland propagates PRIMARY ownership across the Xwayland boundary but not the
# contents, so Xwayland clients get an empty middle-click paste. Its proxy will
# still serve a direct STRING request, but it advertises no text target, and Qt
# asks for TARGETS first and gives up. See hyprwm/Hyprland#6603.
wl-paste --primary --watch xclip -selection primary -i &
# Mapping a new Xwayland window makes Hyprland seize PRIMARY back, so re-push
# whenever the X side stops offering a text target.
while sleep 1; do
wl-paste --primary --no-newline >/dev/null 2>&1 || continue
xclip -o -selection primary -t TARGETS 2>/dev/null | grep -qE 'STRING|text/plain' && continue
wl-paste --primary --no-newline 2>/dev/null | xclip -selection primary -i
done