From 3d87216efd3d1003b70359cc92485efd7b16c595 Mon Sep 17 00:00:00 2001 From: Pete Jackson Date: Tue, 5 May 2026 08:11:54 -0400 Subject: [PATCH] Make middle-click paste consistent across apps by enabling GTK/Chromium apps to receive selection buffer on button3 (#5577) * Enable middle-click primary paste for GTK/Chromium apps gsettings-desktop-schemas 50.x ships gtk-enable-primary-paste=false as the default. GTK4 apps (Ghostty 1.3.0+) and Chromium-family browsers honor that setting and silently no-op middle-click paste, even though the primary selection itself works (wl-paste --primary returns text, Firefox/LibreOffice paste fine because they implement primary paste themselves rather than going through GTK). Flip the GSetting to true so middle-click paste behaves the way Linux desktop users expect across Ghostty, Brave, and Chromium. Closes #5371 * Address Copilot review on #5577 Move install-time GSetting from install/config/ to install/first-run/ so it runs after login when a session D-Bus is guaranteed (matching the existing gnome-theme.sh convention). Make the migration's gsettings call best-effort with `|| true` so a missing dconf service doesn't trigger the omarchy-migrate skip prompt. --- bin/omarchy-first-run | 1 + install/first-run/gtk-primary-paste.sh | 1 + migrations/1777929468.sh | 5 +++++ 3 files changed, 7 insertions(+) create mode 100755 install/first-run/gtk-primary-paste.sh create mode 100755 migrations/1777929468.sh diff --git a/bin/omarchy-first-run b/bin/omarchy-first-run index 909e9210..8fde0534 100755 --- a/bin/omarchy-first-run +++ b/bin/omarchy-first-run @@ -16,6 +16,7 @@ if [[ -f $FIRST_RUN_MODE ]]; then bash "$OMARCHY_PATH/install/first-run/firewall.sh" bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh" bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh" + bash "$OMARCHY_PATH/install/first-run/gtk-primary-paste.sh" bash "$OMARCHY_PATH/install/first-run/elephant.sh" sudo rm -f /etc/sudoers.d/first-run diff --git a/install/first-run/gtk-primary-paste.sh b/install/first-run/gtk-primary-paste.sh new file mode 100755 index 00000000..9a4304ed --- /dev/null +++ b/install/first-run/gtk-primary-paste.sh @@ -0,0 +1 @@ +gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true diff --git a/migrations/1777929468.sh b/migrations/1777929468.sh new file mode 100755 index 00000000..9f1afa87 --- /dev/null +++ b/migrations/1777929468.sh @@ -0,0 +1,5 @@ +echo "Enable middle-click primary paste for GTK/Chromium-family apps (Ghostty, Brave, Chromium)" + +if command -v gsettings >/dev/null; then + gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true || true +fi