73 lines
6.1 KiB
Markdown
73 lines
6.1 KiB
Markdown
/project-setup
|
|
|
|
# Project: Tunal
|
|
|
|
Build Tunal, our own desktop file manager in Rust with Material You styling. It is not a clone or fork of Dolphin. Use the Dolphin repository (https://github.com/KDE/dolphin.git) only as a feature reference. Don't copy its code, names or branding. Dolphin is GPL, so reimplementing its features in our own code is fine, but copying its code is not.
|
|
|
|
## Decisions already made (don't ask again)
|
|
- **Name:** Tunal. Binary `tunal`.
|
|
- **GUI toolkit: Slint 1.19** (pure Rust). Why: declarative per-property animations (`animate`, states, transitions), a virtualized ListView, and full control over styling. Build our own components (buttons, rows, tabs, chips, menus, dialogs) on a `Theme` global and a `Motion` global of tokens instead of restyling std-widgets. Set the std-widgets style to `material` only where a built-in widget is still used (scrollbars, text input).
|
|
- **Material You colors:** read `org.freedesktop.appearance` `accent-color` and `color-scheme` from the XDG Settings portal over D-Bus with `zbus` (blocking API, no async runtime). Listen for `SettingChanged` and re-theme live. Generate the light and dark schemes from the accent with `material-colors` 0.5 (`ThemeBuilder::with_source`, tonal spot). Fall back to a fixed seed color when the portal has no accent.
|
|
- **Icons:** Material Symbols Rounded, bundled from `/usr/share/fonts/TTF/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf` (Apache-2.0; ship its license) and drawn by codepoint, for example folder `e2c7` and home `e88a`. The app icon is `assets/tunal.svg`, `.png` and `.ico`.
|
|
- **Music metadata:** MusicBrainz for tags and the Cover Art Archive for covers. No API key; keep to 1 request/s and send a proper User-Agent. AcoustID fingerprint lookup (`rusty-chromaprint`) can come later.
|
|
- **Tag reading and writing:** `lofty`.
|
|
|
|
## Core file manager features
|
|
- Tabs, split view, an editable breadcrumb path bar, back, forward and up navigation, and a places sidebar
|
|
- Context menus the user can edit from inside the app (add, remove and reorder actions)
|
|
- Copy path, copy, cut, paste, rename, delete, move to trash, and properties
|
|
- Sorting, grouping and a toggle for hidden files
|
|
- Sudo elevation: when an operation needs root, ask for the password and handle it securely (never logged, never on a command line, zeroed after use)
|
|
- Read `.directory` files (desktop entry format) for the folder icon, display name and view settings, and let the user edit them to change folder icons and metadata
|
|
|
|
## Appearance and motion
|
|
- Material You styling that follows the system accent color and light/dark mode, and updates live when either changes
|
|
- Plain Material icons for files and folders when previews are off
|
|
- When previews are on, thumbnails: images, a video frame at a chosen timestamp, and embedded album art for audio
|
|
- Everything animates: navigation, view transitions, list inserts, removals and reorders, hover and press on every control, selection indicators, menus, dialogs and the sidebar. Follow the `app-taste` skill's rules (tokens only, hover tint and press squeeze on every control, interruptible motion, honour reduced motion, no idle animation, repaint only while something moves).
|
|
- At each UI milestone, run `/unslop` on the screens and `/improve-animations` to audit motion, and use the `animate` skill when building new motion. There is no `/review-animations` skill on this machine; `/improve-animations` replaces it.
|
|
- Check every UI step with screenshots in light and dark, hovered and pressed, empty and full, at the smallest window size.
|
|
|
|
## Media
|
|
- Music tag editor: read and write tags, look up metadata and cover art (MusicBrainz and the Cover Art Archive), and embed the results and cover into the file
|
|
- Quick audio player with a waveform seek bar
|
|
|
|
## Device sharing (native, without other file managers or external apps)
|
|
- iOS: browse and transfer files over AFC
|
|
- Android: browse and transfer files over MTP
|
|
|
|
## Network connections
|
|
- Browse remote folders over SSH (SFTP) as a location like any other: tabs, split view, copy, move, rename, delete and properties work the same as on local files
|
|
- Saved connections in the places sidebar (host, port, user, start folder), authentication by SSH agent, key file or password, and host key checking against `~/.ssh/known_hosts` with a prompt for unknown hosts
|
|
- Read the hosts in `~/.ssh/config` so they show up without extra setup
|
|
- Prefer a pure-Rust SSH crate (for example `russh` with `russh-sftp`)
|
|
- Design the location layer so other protocols can be added later without changing the views
|
|
|
|
## Constraints
|
|
- All Rust. Prefer pure-Rust crates. If a C library is unavoidable, say which one and why, and ask before adding it. Known cases to raise when they come up:
|
|
- video frame thumbnails (FFmpeg or GStreamer)
|
|
- audio output (`cpal` links ALSA)
|
|
- iOS (the `idevice` crate talks to the system `usbmuxd` daemon)
|
|
- MTP (pure Rust over `nusb` versus `libmtp`)
|
|
- dragging files out to other apps (Slint has no drag-out yet, so it needs our own Wayland/X11 code)
|
|
- Linux first, Wayland and X11.
|
|
- Don't use Dolphin, KDE or other file manager names in the UI, binaries or docs.
|
|
|
|
## Assets
|
|
Move `/home/astar76/Downloads/assets` (`tunal.svg`, `tunal.png`, `tunal.ico`) into the project as `assets/` and reference the app icons from there.
|
|
|
|
## Phases (plans in this order)
|
|
1. Cargo workspace, module layout (crates such as `tunal` app, `tunal-core` filesystem/ops and the location layer, `tunal-theme`, then `tunal-dirmeta`, `tunal-elevate`, `tunal-thumbs`, `tunal-tags`, `tunal-player`, `tunal-devices`, `tunal-net`), README, FEATURES.md
|
|
2. App skeleton: window, theme from the portal, token globals, base animated components
|
|
3. File browsing (tabs, split view, breadcrumbs, history, places, sorting, grouping, hidden files, file operations, editable context menus)
|
|
4. `.directory` support
|
|
5. Sudo prompts
|
|
6. Thumbnails
|
|
7. Tag editor
|
|
8. Audio player
|
|
9. Device sharing (AFC, then MTP)
|
|
10. Network connections (SFTP)
|
|
|
|
Keep FEATURES.md up to date, mapping each feature borrowed from the reference app to our implementation, without naming that app in the shipped UI.
|
|
|
|
Ask before any decision not covered here.
|