S037: desktop entry, install script, final docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
astar76 2026-11-19 05:18:34 -06:00
commit a3b1fb131a
8 changed files with 115 additions and 35 deletions

View file

@ -1,67 +1,67 @@
# Tunal features
Status: planned → done (later plans update their rows when they ship a feature). Plan ids refer to `Plans/INDEX.md`.
Status: done = built and checked here; built, awaiting real-world check = built and tested against mocks or a local server, but not yet tried on real hardware or with other apps (checklist in `docs/real-world-checks.md`). Plan ids refer to `Plans/INDEX.md`.
## Core file manager
| Feature | Status | Plan | Crate / module |
|---|---|---|---|
| Location layer (list, stat, read, write, copy, move, rename, delete, trash), local backend | planned | S006 | tunal-core |
| Copy, cut, paste, rename, delete, move to trash, file operations with progress, cancel and conflicts | planned | S007, S011 | tunal-core, tunal |
| Details view and icon grid view, type-to-filter | planned | S008, S009 | tunal |
| Location layer (list, stat, read, write, copy, move, rename, delete, trash), local backend | done | S006 | tunal-core |
| Copy, cut, paste, rename, delete, move to trash, file operations with progress, cancel and conflicts | done | S007, S011 | tunal-core, tunal |
| Details view and icon grid view, type-to-filter | done | S008, S009 | tunal |
| Sorting, grouping, hidden files toggle | done | S008 | tunal |
| Playlist sort in the music folder (m3u, m3u8, pls, xspf, wpl order; folder and shared Playlists folder) | done | S008 | tunal-core::playlist, tunal |
| Tabs, split view, editable breadcrumb path bar, back / forward / up, places sidebar | planned | S010 | tunal |
| Copy path, properties, Open, Open with | planned | S012 | tunal |
| Tabs, split view, editable breadcrumb path bar, back / forward / up, places sidebar | done | S010 | tunal |
| Copy path, properties, Open, Open with | done | S012 | tunal |
| Relative dates ("5 minutes ago", "Yesterday, 3:42 PM") turning into date and time, 12/24-hour clock, both set in Settings | done | S039 | tunal |
| Settings dialog and context menus the user can edit (add, remove, reorder) | planned | S013 | tunal |
| In-app drag and drop (Move / Copy / Link / Cancel menu) | planned | S014 | tunal |
| `.directory` files: folder icon, display name, view settings, editable | planned | S015 | tunal-dirmeta |
| Sudo elevation through pkexec/polkit, never handling the password | planned | S016 | tunal-elevate |
| Settings dialog and context menus the user can edit (add, remove, reorder) | done | S013 | tunal |
| In-app drag and drop (Move / Copy / Link / Cancel menu) | done | S014 | tunal |
| `.directory` files: folder icon, display name, view settings, editable | done | S015 | tunal-dirmeta |
| Sudo elevation through pkexec/polkit, never handling the password | built, awaiting real-world check | S016 | tunal-elevate |
## Appearance and motion
| Feature | Status | Plan | Crate / module |
|---|---|---|---|
| Material You colours from the portal accent and light/dark mode, live updates | planned | S002 | tunal-theme |
| Theme and Motion token globals, window, screenshot command | planned | S003 | tunal |
| Material You colours from the portal accent and light/dark mode, live updates | done | S002 | tunal-theme |
| Theme and Motion token globals, window, screenshot command | done | S003 | tunal |
| Animated base controls, menus, dialogs, toasts | done | S004, S005 | tunal |
| List insert / remove / reorder motion | planned | S009 | tunal |
| List insert / remove / reorder motion | done | S009 | tunal |
| Material icons for files and folders | done | S008 | tunal |
| Thumbnails: images, video frames, embedded album art | planned | S017, S018 | tunal-thumbs |
| Motion audit and visual sign-off | planned | S034, S035 | tunal |
| Thumbnails: images, video frames, embedded album art | done | S017, S018 | tunal-thumbs |
| Motion audit and visual sign-off | built, awaiting user review | S034, S035 | tunal |
## Media
| Feature | Status | Plan | Crate / module |
|---|---|---|---|
| Tag read/write (one or many files) | planned | S019 | tunal-tags |
| MusicBrainz and Cover Art Archive lookup | planned | S020 | tunal-tags |
| Tag editor UI | planned | S021 | tunal |
| Quick audio player with waveform seek bar | planned | S022, S023 | tunal-player |
| Tag read/write (one or many files) | done | S019 | tunal-tags |
| MusicBrainz and Cover Art Archive lookup | done | S020 | tunal-tags |
| Tag editor UI | done | S021 | tunal |
| Quick audio player with waveform seek bar | done | S022, S023 | tunal-player |
## Devices
| Feature | Status | Plan | Crate / module |
|---|---|---|---|
| iOS browsing and transfer over AFC | planned | S024 | tunal-devices |
| Android browsing and transfer over MTP | planned | S025, S026 | tunal-devices |
| iOS browsing and transfer over AFC | built, awaiting real-world check | S024 | tunal-devices |
| Android browsing and transfer over MTP | built, awaiting real-world check | S025, S026 | tunal-devices |
## Network
| Feature | Status | Plan | Crate / module |
|---|---|---|---|
| `~/.ssh/config` hosts and known_hosts handling | planned | S027 | tunal-net |
| SFTP location (agent, key or password authentication) | planned | S028 | tunal-net |
| Saved connections in the places sidebar | planned | S029 | tunal |
| `~/.ssh/config` hosts and known_hosts handling | built, awaiting real-world check | S027 | tunal-net |
| SFTP location (agent, key or password authentication) | built, awaiting real-world check | S028 | tunal-net |
| Saved connections in the places sidebar | built, awaiting real-world check | S029 | tunal |
## Desktop integration
| Feature | Status | Plan | Crate / module |
|---|---|---|---|
| Native drag and drop and file clipboard on Wayland | planned | S030 | tunal |
| Native drag and drop and file clipboard on X11 | planned | S031 | tunal |
| Desktop entry and install script | planned | S037 | packaging |
| Native drag and drop and file clipboard on Wayland | built, awaiting real-world check | S030 | tunal |
| Native drag and drop and file clipboard on X11 | built, awaiting real-world check | S031 | tunal |
| Desktop entry and install script | done | S037 | packaging |
## Not planned

View file

@ -10,11 +10,11 @@ Install Tunal for daily use and close the project docs.
README.md; FEATURES.md; assets/polkit/; docs/DECISIONS.md D-016, D-018.
## Steps
- [ ] `assets/tunal.desktop` (MimeType `inode/directory`, icon, Exec with %U).
- [ ] `scripts/install.sh`: `cargo build --release`, install binary, desktop entry and icons under `~/.local` by default (PREFIX overridable); the polkit policy needs root, so print the one `sudo install` line instead of running it.
- [ ] README: install section, runtime requirements (D-016), shortcuts; FEATURES.md: every row's final status.
- [ ] Full checks: build, clippy, fmt, tests; STATUS.md → done.
- [ ] PROGRESS entry, INDEX line, commit `S037: …`
- [x] `assets/tunal.desktop` (MimeType `inode/directory`, icon, Exec with %U).
- [x] `scripts/install.sh`: `cargo build --release`, install binary, desktop entry and icons under `~/.local` by default (PREFIX overridable); the polkit policy needs root, so print the one `sudo install` line instead of running it.
- [x] README: install section, runtime requirements (D-016), shortcuts; FEATURES.md: every row's final status.
- [x] Full checks: build, clippy, fmt, tests; STATUS.md → done.
- [x] PROGRESS entry, INDEX line, commit `S037: …`
## End criteria
- `cargo build --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` and `cargo fmt --check` pass.

View file

@ -80,4 +80,4 @@ Tracker: https://claude.ai/artifact/4X8YCk3cQjUGyuyCqGuU7v
## 13 Packaging
- [ ] [S037 — Desktop entry, install script and final pass](13%20Packaging/S037-install-final.md) · Sonnet medium
- [x] [S037 — Desktop entry, install script and final pass](13%20Packaging/S037-install-final.md) · Sonnet medium

View file

@ -2,7 +2,7 @@
Tunal is a desktop file manager for Linux (Wayland and X11), written in Rust with [Slint](https://slint.dev) and Material You styling. It follows the system accent colour and light/dark mode, and animates navigation, lists, menus and dialogs.
Planned features: tabs, split view, places, file operations with trash, `.directory` folder metadata, sudo elevation, thumbnails, a music tag editor, a quick audio player, iOS/Android device browsing and SFTP locations. See [FEATURES.md](FEATURES.md) for the feature map and [PLAN.md](PLAN.md) for the roadmap.
Features: tabs, split view, places, file operations with trash, `.directory` folder metadata, sudo elevation, thumbnails, a music tag editor, a quick audio player, iOS/Android device browsing and SFTP locations. See [FEATURES.md](FEATURES.md) for every feature and its status and [PLAN.md](PLAN.md) for the roadmap.
## Build and run
@ -12,6 +12,39 @@ cargo run -p tunal
Needs a recent stable Rust toolchain.
## Install
```
bash scripts/install.sh
```
Builds in release mode and installs the `tunal` binary, desktop entry and icons under `~/.local` (set `PREFIX=/some/dir` to change that). Folders then open with Tunal from application launchers.
Root operations go through `pkexec`, which only accepts an installed binary. Put `tunal` at `/usr/bin/tunal` and install the polkit policy once (the script prints the line):
```
sudo install -Dm644 assets/polkit/org.tunal.Tunal.elevated-helper.policy /usr/share/polkit-1/actions/org.tunal.Tunal.elevated-helper.policy
```
## Shortcuts
| Keys | Action |
|---|---|
| Ctrl+T / Ctrl+W | New tab / close tab |
| Ctrl+L | Edit the path |
| Ctrl+D | Bookmark the current folder |
| Ctrl+H | Show or hide hidden files |
| Ctrl+A | Select all |
| Ctrl+C / Ctrl+X / Ctrl+V | Copy / cut / paste files |
| Ctrl+Shift+C | Copy the path |
| Ctrl+Shift+N | New folder |
| F2 | Rename |
| Delete / Shift+Delete | Move to trash / delete for good |
| Space | Play the selected audio file |
| Ctrl+, | Settings |
| Typing in a folder | Filter the list; Esc clears it |
| Drag with Shift / Ctrl / Ctrl+Shift | Move / copy / link at once, without the drop menu |
## Crates
| Crate | Role |

11
assets/tunal.desktop Normal file
View file

@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Name=Tunal
GenericName=File Manager
Comment=Browse and manage files, devices and SFTP locations
Exec=tunal %U
Icon=tunal
Terminal=false
Categories=System;FileTools;FileManager;
MimeType=inode/directory;
StartupNotify=true

View file

@ -281,5 +281,11 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
- Verified: workspace build, workspace clippy -D warnings, fmt --check, literal grep empty.
- Not done: 🧑 visual review (step 4) — **visual review pending**, user's verdict not recorded; INDEX not ticked. Press squeeze and live motion feel only checkable in a real window.
## S037 — Desktop entry, install script, final docs
- Done: `assets/tunal.desktop` (passes `desktop-file-validate`), `scripts/install.sh` (release build; binary, desktop entry, svg + png icons under `$PREFIX`, default `~/.local`; prints the `sudo install` line for the polkit policy, never runs it), README install, shortcuts and requirements, FEATURES.md final statuses ("built, awaiting real-world check" for devices, native DnD and clipboard, SFTP, ssh config, polkit; "built, awaiting user review" for the motion audit row), STATUS.md "Code complete; open: S035 and S036 (user)".
- Verified: `PREFIX=<scratch> bash scripts/install.sh` installed binary, desktop entry and both icons; build, clippy -D warnings, fmt --check, `cargo test --workspace` green.
- Not done: nothing run against the real `~/.local` or `/usr`; the installed copy at `/usr/bin/tunal` and the polkit policy are for the user.
- How to install: `bash scripts/install.sh`, then the printed `sudo install` line.
## Later
-

View file

@ -2,4 +2,4 @@
Live status is in `Plans/INDEX.md` (ticked plans), the tracker linked there, and the last entries of `docs/PROGRESS.md`. This file only records the current phase.
Current phase: plans generated (S001–S037, 13 categories); next: S001 via `/orchestrate`.
Code complete; open: S035 visual review and S036 real-world checks (user).

30
scripts/install.sh Normal file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Builds Tunal in release mode and installs it for the current user.
# bash scripts/install.sh installs under ~/.local
# PREFIX=/some/dir bash scripts/install.sh
# The polkit policy needs root, so its install line is printed, not run.
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
prefix="${PREFIX:-$HOME/.local}"
cd "$root"
cargo build --release -p tunal
install -Dm755 target/release/tunal "$prefix/bin/tunal"
install -Dm644 assets/tunal.desktop "$prefix/share/applications/tunal.desktop"
install -Dm644 assets/tunal.svg "$prefix/share/icons/hicolor/scalable/apps/tunal.svg"
install -Dm644 assets/tunal.png "$prefix/share/icons/hicolor/256x256/apps/tunal.png"
command -v update-desktop-database >/dev/null && update-desktop-database "$prefix/share/applications" || true
command -v gtk-update-icon-cache >/dev/null && gtk-update-icon-cache -qtf "$prefix/share/icons/hicolor" || true
echo "Installed Tunal under $prefix"
case ":$PATH:" in
*":$prefix/bin:"*) ;;
*) echo "Note: $prefix/bin is not in PATH." ;;
esac
echo
echo "Root operations (Tunal asks polkit for the password) need the policy file, which"
echo "belongs to /usr/bin/tunal. Install the binary there too, then run:"
echo " sudo install -Dm644 $root/assets/polkit/org.tunal.Tunal.elevated-helper.policy /usr/share/polkit-1/actions/org.tunal.Tunal.elevated-helper.policy"