Skip to content

Keep GNOME text scaling from clipping 1Password's fixed-size dialogs - #8575

Open
SilentKernel wants to merge 2 commits into
omacom:quattrofrom
SilentKernel:1password-text-scaling
Open

SilentKernel wants to merge 2 commits into
omacom:quattrofrom
SilentKernel:1password-text-scaling

Conversation

@SilentKernel

Copy link
Copy Markdown

Fixes #8574 (root cause of #2016).

Problem

omarchy display text size sets GNOME's text-scaling-factor, and 1Password's Electron runtime multiplies that factor into its device scale. Its fixed-size windows then lose that factor of layout space: at text size 16 (factor 1.36) the SSH authorization prompt — fixed at ~402x371 logical px, min size = max size, so window rules and resize dispatchers are ignored — clips ~26% of its content, including the authorize button. Full analysis and DPR measurements in #8574.

Fix

Serve 1Password default gsettings (GSETTINGS_BACKEND=memory) so it renders at the plain monitor scale, on every launch path:

  • bin/omarchy-launch-1password — the keybinding/menu launcher passes the env.
  • etc/systemd/user/app-1password@autostart.service.d/text-scaling.conf — packaged drop-in for the autostart unit. The env can't live in the autostart desktop file because 1Password rewrites ~/.config/autostart/1password.desktop on startup; the generated app-1password@autostart.service picks the drop-in up instead.
  • default/applications/1password.desktop — local desktop override (battlenet pattern) so app-library launches match; installed by omarchy-install-service-1password and by the migration for existing installs with 1Password present.
  • Migration — installs the desktop override and systemctl --user daemon-reloads so the packaged drop-in applies without a relogin. The running 1Password keeps its old environment until restarted (deliberately not restarted mid-update: that would lock the vault under the user).

Trade-off: 1Password renders at standard size instead of following the text scale (in-app Ctrl+= zoom compensates for the main window and doesn't affect the dialogs). Dark/light detection is portal-based and unaffected.

Verification

On a live Omarchy install (3840x2160 @ scale 2, text-scaling-factor 1.3636, 1Password 8.12.32):

  • Before: SSH authorization prompt fixed at 402x371 with buttons clipped; devicePixelRatio 2.72.
  • After relaunching with the env: DPR 2.0, the prompt sizes itself to fit its content (402x426), everything visible, agent signs fine.
  • Env candidates were measured with a scratch Chromium + CDP before settling on GSETTINGS_BACKEND=memory (GDK_DPI_SCALE is a no-op for Chromium; --force-device-scale-factor multiplies and makes it worse) — table in omarchy display text size breaks 1Password's fixed-size dialogs (root cause of #2016) #8574.
  • test/shell.d/launch-1password-test.sh extended to cover the env on the launcher, the drop-in, and the desktop override; passes. The rest of ./test/all matches master (5 pre-existing environment-dependent failures, unrelated).

(No before/after captures possible: 1Password windows are no_screen_share-tagged, screenshots come out black.)

omarchy display text size sets GNOME's text-scaling-factor, which
1Password's Electron runtime multiplies into its device scale. Its
fixed-size windows (the SSH authorization prompt refuses resizes
entirely) then lose that factor of layout space and clip their buttons
off-screen.

Serve 1Password default gsettings (GSETTINGS_BACKEND=memory) on every
launch path so it renders at the plain monitor scale: the launcher, the
installer's desktop override and first launch, and a packaged systemd
user drop-in for the autostart unit (1Password rewrites its own
autostart desktop file, so the env cannot live there).
Copilot AI balanced review requested due to automatic review settings August 27, 2026 12:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents GNOME text scaling from clipping 1Password’s fixed-size dialogs.

Changes:

  • Applies GSETTINGS_BACKEND=memory across launch paths.
  • Adds migration and installer support.
  • Extends shell tests.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
bin/omarchy-launch-1password Applies the environment override when launching.
bin/omarchy-install-service-1password Installs the desktop override and launches consistently.
default/applications/1password.desktop Adds an app-library launch override.
etc/systemd/user/app-1password@autostart.service.d/text-scaling.conf Applies the override during autostart.
migrations/1787832813.sh Updates existing installations.
test/shell.d/launch-1password-test.sh Checks launcher and configuration changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread migrations/1787832813.sh

# Pick up the packaged autostart drop-in without waiting for a relogin.
# The running 1Password keeps its old environment until it is restarted.
systemctl --user daemon-reload
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 45819a1. The bug is real, but most of this change has been overtaken by quattro since the branch forked, and it no longer merges.

The bug reproduces. On an Omarchy ISO worker (monitor scale 1), Chromium under native Wayland reports devicePixelRatio 1.359375 once text-scaling-factor is 1.3636. Both GSETTINGS_BACKEND=memory and --force-device-scale-factor=1 bring it back to 1. I also tried monitor scale 2, but Chromium in the VM ignored the monitor scale entirely there, so that run shows nothing either way.

What quattro already covers. 446fbc2 (#10673) launches 1Password from the hotkey with --force-device-scale-factor=1, and omacom/omarchy-pkgs#342 puts the same flag on Exec= in the packaged /usr/share/applications/1password.desktop. So the launcher change here and the default/applications/1password.desktop override are both superseded. #10673 also decided against a user-level .desktop override on purpose: it shadows the packaged entry, so the app launcher's Remove deletes the override and leaves the package installed. It also lingers after pacman -Rns. The override, its installer step and its migration would bring that back. This branch now conflicts with quattro in bin/omarchy-launch-1password, bin/omarchy-install-service-1password and test/shell.d/launch-1password-test.sh.

What quattro does not cover yet:

  • 1Password's own autostart entry, which it rewrites itself, so the flag can't live there. The drop-in in this PR (etc/systemd/user/app-1password@autostart.service.d/text-scaling.conf) is the right way in. On the worker it attached to the generated app-1password@autostart.service and set GSETTINGS_BACKEND=memory. For SSH-agent users, the process that draws the authorization prompt is usually this autostarted one.
  • The installer's first launch, setsid uwsm-app -- 1password in bin/omarchy-install-service-1password, which still starts it without the flag.

The proportionate change against today's quattro would be the autostart drop-in plus the flag on the installer's launch line. The launcher change, the .desktop override and the migration's override install would be dropped. One thing needs deciding: the drop-in can only set an environment variable, not add a flag. So autostart would use GSETTINGS_BACKEND=memory, which blanks every in-process gsettings read, while the other paths use the narrower scale flag.

Tests. test/shell.d/launch-1password-test.sh passed at this head on the worker (5 of 5), against the branch's old base. The full suite was not run, because the branch can't be tested against current quattro until the conflicts are resolved.

Second opinion. None: the configured reviewer (Codex Medium) was reachable, but today's review budget was used up. This review is one model's reasoning (Claude Opus 5.5).

Nothing was pushed. It is waiting on the maintainer to decide whether to narrow it to the autostart and installer paths or close it in favour of #10673.

@sjnims

sjnims commented Oct 4, 2026

Copy link
Copy Markdown

Confirming this fix works for me.

Setup: Omarchy 4.0.4, 1Password 8.12.36-2, 1920x1200 display at scale 1, text-scaling-factor 1.2727 (set via omarchy display text size).

Before: the SSH authorization prompt opened at 420x390. Its contents then grew past the window edges, hiding the Authorize button.

After: I applied the change locally, launching 1Password with GSETTINGS_BACKEND=memory through a ~/.local/share/applications/1password.desktop override plus an autostart drop-in. The prompt now shows in full, I can approve it, and SSH signing through the agent works (ssh -T git@github.com authenticates).

Two things I had to adjust for 1Password 8.12.36:

  • Its autostart entry is now ~/.config/autostart/com.onepassword.OnePassword.desktop. The generated unit is therefore app-com.onepassword.OnePassword@autostart.service, so the drop-in path in this PR (app-1password@autostart.service.d/) doesn't apply. I put the same text-scaling.conf under app-com.onepassword.OnePassword@autostart.service.d/.
  • The window class is now com.onepassword.OnePassword (see Match 1Password's new window class so it floats again #11704), so the override's StartupWMClass=1Password likely needs updating to match.

1Password 8.12 writes its autostart entry as com.onepassword.OnePassword.desktop, so systemd generates app-com.onepassword.OnePassword@autostart.service and the drop-in under app-1password@autostart.service.d never attaches. Ship the same drop-in under the new name and keep the old one for installs still on the earlier entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed after @sjnims's report. I pushed one fix, 496619f, to the branch: the autostart drop-in now also attaches to 1Password 8.12's unit name.

What was wrong. 1Password 8.12 writes its autostart entry as ~/.config/autostart/com.onepassword.OnePassword.desktop. systemd therefore generates app-com.onepassword.OnePassword@autostart.service, and the drop-in under app-1password@autostart.service.d/ never attaches. An installed 1Password 8.12.38 generates exactly that unit. The commit ships the same drop-in under etc/systemd/user/app-com.onepassword.OnePassword@autostart.service.d/text-scaling.conf, keeps the old one for installs still on the earlier entry, and the test now checks both.

Checked on an Omarchy ISO worker. With an 8.12-style autostart entry and both drop-ins in /etc/systemd/user, systemctl --user show lists the new drop-in on the generated unit with Environment=GSETTINGS_BACKEND=memory. With only the old drop-in, the head before this push, Environment is empty. test/shell.d/launch-1password-test.sh passed 6 of 6 there. 1Password itself was not run on the worker.

Second opinion. Codex Medium reviewed the branch against current quattro. It found the unit-name defect on its own, from the unit an installed 1Password generates. It then reviewed the fix commit and found nothing. It had access to this review's reasoning, so its agreement is not guaranteed to be independent.

Competing fix. #13910 also pins scaling for autostart, but does it by editing 1Password's autostart entry. @tmullen reports on #13910 that 1Password rewrites that entry on every launch, so the pin lasts one login at most. I have not reproduced that. This PR is older and its drop-in survives a rewrite, so it should win by default. Choosing between them is the maintainer's call.

Still open from the earlier review. The branch still conflicts with quattro. On current quattro, the launcher change and the default/applications/1password.desktop override are superseded by #10673. The override's StartupWMClass=1Password is also stale: 8.12's window class is com.onepassword.OnePassword. What quattro still lacks is this autostart drop-in and the scale fix on the installer's first launch.

This waits on the maintainer: narrow it to the autostart drop-in plus the installer launch, or close it.

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adjusts 1Password launch environment to prevent UI clipping.

Fix the Apps-menu uninstall path before merging; it now deletes only the override and leaves 1Password installed.

Findings

  1. P1 Uninstall leaves 1Password installed ▶
  2. P2 Removed app keeps its launcher ▶
  3. P2 Custom launcher settings disappear ▶

Summary

The PR gives 1Password GSETTINGS_BACKEND=memory through the command launcher, desktop entry, and two autostart drop-ins. A migration installs the desktop override and reloads user services without restarting the vault.

  • The new override breaks Apps-menu uninstall and survives the dedicated service remover.
  • The migration also replaces existing custom launcher settings.
  • SilentKernel explicitly accepts standard-size text and waiting for an app restart.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Keybinding] --> B[Command launcher]
  C[Apps menu] --> D[User desktop override]
  E[Session autostart] --> F[User service drop-in]
  B --> G[GSETTINGS_BACKEND=memory]
  D --> G
  F --> G
  G --> H[1Password]
  I[Installer or migration] --> D
  C --> J[Uninstall action]
  J --> K[Delete override only]
Loading

Reviews (1) · Last reviewed commit: "Attach the autostart drop-in to 1Passwor..." · Reviewed by Greptile

Comment on lines +34 to +35
install -m 644 "$OMARCHY_PATH/default/applications/1password.desktop" \
"$HOME/.local/share/applications/1password.desktop"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Uninstall leaves 1Password installed

Putting 1password.desktop in the user application directory breaks the Apps menu’s “Uninstall” action. omarchy-remove-launcher-entry finds this copy first, deletes only the file, and exits before removing the package. Users who confirm “Uninstall” leave 1Password installed, and its packaged launcher can reappear. Teach the removal path to recognize this managed override and uninstall the app. The migration creates the same override.

Knowledge Base Used: Launchers, menus, and application lifecycle

Comment on lines +34 to +36
install -m 644 "$OMARCHY_PATH/default/applications/1password.desktop" \
"$HOME/.local/share/applications/1password.desktop"
update-desktop-database "$HOME/.local/share/applications" 2>/dev/null || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Removed app keeps its launcher

The new user launcher survives omarchy-remove-service-1password. That command removes the packages and Chromium extension but never deletes ~/.local/share/applications/1password.desktop. The remaining entry points to the removed binary, and its Exec starts with the still-installed env command. Remove the override and refresh the desktop database in the matching remover. This also applies to the override installed by the migration.

Knowledge Base Used: Packages, apps, and optional services

Comment thread migrations/1787832813.sh
Comment on lines +5 to +6
install -m 644 "$OMARCHY_PATH/default/applications/1password.desktop" \
"$HOME/.local/share/applications/1password.desktop"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Custom launcher settings disappear

If a user already has a custom 1password.desktop, this migration replaces it without checking its contents. Omarchy did not manage that override before this PR, so the file can contain the user’s launch flags or Hidden setting. Those choices disappear during the update. Preserve existing files and add the environment setting without replacing unrelated fields, or install the template only when the file is missing.

Knowledge Base Used: Migration framework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy display text size breaks 1Password's fixed-size dialogs (root cause of #2016)

4 participants