Repository navigation
Add AGENTS.md, image paste, Backspace nav, NoDisplay handlers, terminal fix, and media viewer tweaks - #105
Merged
Conversation
Binary image data on the clipboard was ignored by paste. Clipboard images are now detected in syncFromSystemClipboard(), and Ctrl+V / the context-menu Paste action route them through pasteImage(), which writes a non-clobbering image.png / image (n).png into the current folder and opens the rename dialog so the user can name it. - Add clipboardImageData property tracking the clipboard image payload - Detect and extract image data via imageData(), with explicit mime-type fallbacks, stored as base64 PNG - pasteImage() returns the created path and picks a default name - syncFromSystemClipboard() emits clipboardChanged for image-only updates so canPaste and the menu stay in sync
Compacts Atlas project knowledge for future OpenCode sessions: - Build commands (cmake configure/build) and installation - Directory structure and dependencies (Qt 6.5+, CMake 3.19+, Ninja) - Command-line options, CI/CD workflows, team conventions - Common issues and development tips
Backspace now navigates to the parent directory in the grid, details and compact views, matching Dolphin. Handled through the focused view's key handler so text fields keep their normal Backspace behaviour.
…oup defaults
NoDisplay=true apps (e.g. swappy, which ships NoDisplay=true with
MimeType=image/png;image/jpeg;) were filtered out entirely, so they never
appeared in the Open With dialog even though they are valid handlers for
the selected file type. NoDisplay means "don't show in launchers", not
"not a handler", so NoDisplay entries that explicitly declare the file's
mime type are now included as recommended choices, can be launched via
openWith(), and can be resolved as defaults. Hidden entries stay excluded.
Follow-up fixes:
- Desktop files are parsed line-by-line in the real desktop-entry format;
QSettings::IniFormat collapsed "MimeType=image/png;image/jpeg;" to
"image/png" so an app like swappy only ever matched its first MIME type.
- mimeapps.list is read and written by hand in the plain XDG format;
QSettings percent-escaped group names and backslash-escaped MIME keys,
producing a file xdg-open silently ignores.
- Setting a default for one file type ("Always use this application...")
now registers the app for every MIME type it declares in the same group
(e.g. all image/*), so one click covers all supported extensions instead
of clobbering an earlier choice for a sibling type.
Desktop entries declaring Terminal=true (like micro.desktop) need a tty: picking them in Open With launched the raw binary with no tty attached and nothing appeared to happen, while normal open spammed "/dev/tty: no such device or address / Fatal: Micro could not initialize a Screen." - Open With runs Terminal=true entries via the user's terminal emulator (TERMINAL env, then foot/kitty/alacritty/...), matching AppIntegration - Normal open resolves the default app first; Terminal=true defaults are routed through MimeService::openWith, everything else keeps the system handler via QDesktopServices
- Prevent opening non-image/video files in media viewer - Require selection for Space key media preview - Change Ctrl+Shift+N to create new folder instead of file - Update Space key handlers in all view modes (grid/compact/details)
Collaborator
|
Id redo AGENTS.md. If youre going to add documentation, id rather it be for humans under a CONTRIBUTORS.md. |
- performSearch walks the tree manually so hidden directories are pruned when hidden files are off, and no longer follows directory symlinks (avoids Wine-prefix/symlink cycles flooding results) - search field: '/' is consumed, Enter selects the first match, Up/Down hand focus to the results and step the selection, Esc closes the search and restores focus while keeping the query - Backspace in the results (and on an empty search field) closes the search filter instead of navigating to the parent directory - address editor and search bar are mutually exclusive so Ctrl+L during a search (or dismissing search with Esc) no longer reveals a stale address editor; navigating or switching tabs clears an active search
- Add ShortcutManager C++ singleton (src/core): canonical action registry of 39 actions with id/label/category/icon/defaults, user overrides persisted as compact JSON under shortcuts/bindings, plus conflict detection, reassign, per-action and global reset, and key-event -> portable sequence mapping - Add AppShortcut.qml wrapper: live sequences come from the registry and all shortcuts are silenced while the key recorder is open - Consolidate the ~45 hard-coded Shortcut blocks in main.qml into 39 AppShortcut actions (merging semantic duplicates like Ctrl+H/Alt+.) - Add Shortcuts tab to PreferencesModal: searchable, category-grouped list with per-row record/add/remove/reset, KeyRecorderDialog with bare-key confirmation and conflict replace/cancel flow, and a two-step Reset All button - Fix Ctrl+N default to create a new file (Ctrl+Shift+N/F10 for folder) - Unit-tested the data layer via a standalone harness: defaults, canonicalization, overrides, conflicts, reassign, reset, persistence
Replace our hand-rolled Default/Added-association writer with the more robust implementation merged upstream (AstraSuite/Atlas PR AstraSuite#104, commit 9f9837d): a plain-XDG MimeappsData model, parseMimeapps/writeMimeapps helpers, migration of group/key names previously mangled by QSettings::IniFormat, and Removed Associations handling. setDefaultApp now reports success (bool) and warns when a per-desktop * -mimeapps.list shadows the shared file. Our extra behaviour is preserved on top of it: - desktop entries are still parsed by hand so multi-valued MimeType fields are not collapsed by QSettings - NoDisplay handlers (e.g. swappy) still appear in Open With and can be resolved as defaults - setting a default still registers the whole MIME group the app declares - Terminal=true entries are still launched in a terminal emulator
Double-clicking a file handed it to QDesktopServices/xdg-open, which pops up the "choose an application to open this file" chooser whenever the association lives only in [Added Associations] or the desktop handler cache is stale, even though Atlas resolves a working handler. Open With was unaffected because it launches the app directly via MimeService. openWithDefault now resolves the default handler through MimeService and launches it with MimeService::openWith (which also covers Terminal=true entries), falling back to QDesktopServices only when no handler is known.
Add a "Drag to Scroll" preference (persisted as session/dragToScroll) that swaps the mouse buttons used for rubber-band selection and panning in the grid, compact and details views: - enabled: left-drag scrolls, right-drag rubber-band selects - disabled: left-drag selects, right-drag scrolls (previous behaviour) Each view's background MouseArea now derives selectButton/scrollButton from the setting, tracks a separate scroll drag alongside the existing selection drag, and suppresses the follow-up click for either gesture so a plain press still deselects (left) or opens the context menu (right).
Previously a drag that started on any item was captured by the item's MouseArea, which always started a native file drag. So with Drag to Scroll on, dragging over an item dragged the file instead of scrolling, and right-drag over an item opened the context menu instead of selecting. The background MouseArea's gesture logic is now exposed as beginGesture/updateGesture/endGesture, and item delegates forward their drag to it whenever the pressed item is *not* selected. An item that is already selected keeps the gesture and is dragged away as before. Result: - nothing selected: dragging over items scrolls (scroll button) or rubber-band selects (select button), with the rubber band drawn from the press point - selection exists: dragging a selected item moves it, nothing else
The band visual and the item selection were computed in different coordinate spaces: - Details: listView is nested inside the horizontal Flickable's ColumnLayout, so listView.y is not in the drag area's space. Convert points through mapToItem/mapFromItem instead of subtracting listView.y. Also use root.rowHeight instead of a hard-coded 36 so taller rows (higher zoom) still line up. - Compact/Grid: GridView lays items out inside (size - leadingMargin - trailingMargin), so the inset must be applied when mapping indices to cells or the row/column count is off by one. Also fixed the auto-scroll edge thresholds in the details view, which used the same incorrect listView.y.
# Conflicts: # src/core/mimeservice.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR includes the following changes from local development:
Commits
Key changes
AGENTS.md (bd124e4)
Clipboard image paste (Dolphin-style) (dac9a8a)
Navigation (db69cea)
Open With / MIME handling (8bd698f)
Terminal app launching (3c75996)
Media viewer tweaks (fb02de7)