Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/xdg-desktop-portal/hyprland-portals.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[preferred]
default = hyprland;gtk
org.freedesktop.impl.portal.FileChooser = gnome
1 change: 1 addition & 0 deletions install/omarchy-base.packages
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ wiremix
wireplumber
wl-clipboard
woff2-font-awesome
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
xdg-terminal-exec
Expand Down
7 changes: 7 additions & 0 deletions migrations/1780365321.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
echo "Use GNOME file picker portal for previews in Open/Save dialogs"

omarchy-pkg-add xdg-desktop-portal-gnome

omarchy-refresh-config xdg-desktop-portal/hyprland-portals.conf

systemctl --user restart xdg-desktop-portal
Comment on lines +1 to +7

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not applying this one — it conflicts with the established convention for omarchy migrations.

  • Shebang: Migrations are never executed directly. omarchy-migrate runs each one with bash "$file", so a #!/usr/bin/env bash line would be inert. 311 of the 313 existing migrations have no shebang.
  • Strict mode: Exactly one existing migration uses set -e, and none use set -euo pipefail. Failure handling is already centralized in the runner: if a migration exits non-zero, omarchy-migrate catches it and offers a gum confirm "Skip and continue?" prompt. Adding set -euo pipefail to a single migration would diverge from the whole corpus and change failure semantics inconsistently.

(The SC2148 shellcheck warning that prompted this fires on every migration in the repo and is intentionally ignored.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not applying this one.

  • Restarting only xdg-desktop-portal is correct. The org.freedesktop.impl.portal.FileChooser = gnome preference is read by the frontend xdg-desktop-portal service, which then dispatches to backends. The GNOME backend is D-Bus–activated on demand, so restarting the frontend is sufficient to pick up the new routing — restarting xdg-desktop-portal-gnome itself is unnecessary. This matches the existing portal-config migration migrations/1763478660.sh, which restarts only xdg-desktop-portal-hyprland for the same reason.
  • try-restart vs restart: During omarchy-migrate the portal is already running inside the live graphical session, so the two behave identically here — and plain restart additionally (re)starts it if needed, which is the desired outcome. No migration in the repo uses try-restart; plain systemctl --user restart is the established pattern.
  • "No user systemd session" case: doesn't apply — omarchy is a systemd/uwsm/Hyprland session and migrations run within it.