Repository navigation
Keep GNOME text scaling from clipping 1Password's fixed-size dialogs - #8575
SilentKernel wants to merge 2 commits into
Conversation
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).
There was a problem hiding this comment.
Pull request overview
Prevents GNOME text scaling from clipping 1Password’s fixed-size dialogs.
Changes:
- Applies
GSETTINGS_BACKEND=memoryacross 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.
|
|
||
| # 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 |
|
Reviewed at 45819a1. The bug is real, but most of this change has been overtaken by The bug reproduces. On an Omarchy ISO worker (monitor scale 1), Chromium under native Wayland reports What What
The proportionate change against today's Tests. 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. |
|
Confirming this fix works for me. Setup: Omarchy 4.0.4, 1Password 8.12.36-2, 1920x1200 display at scale 1, 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 Two things I had to adjust for 1Password 8.12.36:
|
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>
|
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 Checked on an Omarchy ISO worker. With an 8.12-style autostart entry and both drop-ins in Second opinion. Codex Medium reviewed the branch against current 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 This waits on the maintainer: narrow it to the autostart drop-in plus the installer launch, or close it. |
|
| install -m 644 "$OMARCHY_PATH/default/applications/1password.desktop" \ | ||
| "$HOME/.local/share/applications/1password.desktop" |
There was a problem hiding this comment.
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
| 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 |
There was a problem hiding this comment.
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
| install -m 644 "$OMARCHY_PATH/default/applications/1password.desktop" \ | ||
| "$HOME/.local/share/applications/1password.desktop" |
There was a problem hiding this comment.
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
Fixes #8574 (root cause of #2016).
Problem
omarchy display text sizesets GNOME'stext-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.desktopon startup; the generatedapp-1password@autostart.servicepicks the drop-in up instead.default/applications/1password.desktop— local desktop override (battlenet pattern) so app-library launches match; installed byomarchy-install-service-1passwordand by the migration for existing installs with 1Password present.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-factor1.3636, 1Password 8.12.32):devicePixelRatio2.72.GSETTINGS_BACKEND=memory(GDK_DPI_SCALEis a no-op for Chromium;--force-device-scale-factormultiplies and makes it worse) — table inomarchy display text sizebreaks 1Password's fixed-size dialogs (root cause of #2016) #8574.test/shell.d/launch-1password-test.shextended to cover the env on the launcher, the drop-in, and the desktop override; passes. The rest of./test/allmatches master (5 pre-existing environment-dependent failures, unrelated).(No before/after captures possible: 1Password windows are
no_screen_share-tagged, screenshots come out black.)