Skip to content

feat(file-chooser): route file dialogs to the default file manager's picker - #39

Merged
lbssousa merged 1 commit into
mainfrom
feat/file-chooser-follows-file-manager
Nov 22, 2026
Merged

lbssousa merged 1 commit into
mainfrom
feat/file-chooser-follows-file-manager

Conversation

@lbssousa

Copy link
Copy Markdown
Owner

Stacked on #38 (it uses the Files option added there). Merge #38 first; this PR's base then moves to main.

Summary

Omarchy after 4.5.0 prefers Files' picker for other apps' Open/Save dialogs (FileChooser=folio;gtk, omacom/omarchy#19035). The file-chooser feature always wrote flea;gtk and required Flea installed. It also wrote only the portal line, so Flea's picker window was never given its float rule.

The feature now follows the default file manager. Each file_manager option names the portal backend it ships in a new catalog field, chooser, and just check accepts that field only on file managers. The play routes FileChooser to that backend, with gtk behind it:

Default / state FileChooser How
Flea flea;gtk + float rule flea --picker, run when the portal line or the float rule in bindings.lua is missing
Files folio;gtk ini line; Omarchy ships its float rule
Nautilus, or feature off whatever Omarchy's own copy of the file sets (none on 4.5.0, folio;gtk later) ini line or no line; Flea's picker goes with flea --picker off

With the feature off and no portals config of the user's, nothing is written, so Omarchy's packaged config keeps applying. The GTK_USE_PORTAL / qt6ct part is unchanged. The feature is renamed "File dialogs from the default file manager".

Test plan

  • just check
  • Omarchy 4.5.0 VM, file-manager and file-chooser plays in sequence:
    • Flea default: flea;gtk with the float rule; a second run changes nothing
    • Switch to Nautilus: no FileChooser line and no rule
    • Flea default with the feature off: no Flea picker left behind
    • Feature back on: flea;gtk and the rule return
  • Later-Omarchy portals config (folio;gtk) passed as the seed:
    • Nautilus default: folio;gtk
    • Files default, Files present: folio;gtk
    • Feature off: folio;gtk
  • A real portal OpenFile call with Flea as the default opened com.thisisgm.flea.picker, floating (hyprctl clients)
  • A dialog from Files' picker on an Omarchy that ships it (folio isn't in the stable repos yet)

🤖 Generated with Claude Code

@lbssousa
lbssousa changed the base branch from fix/folio-replaces-nautilus to main November 22, 2026 16:43
Omarchy after 4.5.0 prefers Files' picker for other apps' Open/Save
dialogs (FileChooser=folio;gtk, Omarchy PR #19035), while the
file-chooser feature always wrote flea;gtk and required Flea installed.

The feature now follows the default file manager: file_manager options
name the portal backend they ship (`chooser`), and the play routes
FileChooser to it, with gtk behind:

- Flea: through `flea --picker`, which also floats the picker (the
  plain ini line left it tiled);
- Files: folio;gtk, whose float rule ships with Omarchy;
- Nautilus, or the feature off: whatever Omarchy's own copy of the file
  sets (no line on 4.5.0, folio;gtk later), Flea's picker and its window
  rule taken out with `flea --picker off`.

A user without a portals config of their own and the feature off gets
none written: Omarchy's packaged one already applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lbssousa
lbssousa force-pushed the feat/file-chooser-follows-file-manager branch from 5099de3 to e79177c Compare November 22, 2026 16:45
@lbssousa
lbssousa merged commit a71e151 into main Nov 22, 2026
1 check passed
@lbssousa
lbssousa deleted the feat/file-chooser-follows-file-manager branch December 3, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant