diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/DEFAULTS.md | 43 | ||||
| -rw-r--r-- | docs/TODO.md | 32 |
2 files changed, 73 insertions, 2 deletions
diff --git a/docs/DEFAULTS.md b/docs/DEFAULTS.md index 7e712c5..5f99446 100644 --- a/docs/DEFAULTS.md +++ b/docs/DEFAULTS.md @@ -17,6 +17,10 @@ srd.set("general.rounded_corners", true) -- Default: true on GLES/ srd.set("general.focus_follows_mouse", false) -- Default: false - hover a window to focus it, no click needed srd.set("general.auto_raise", false) -- Default: false - also raise on hover-focus, not just focus srd.set("general.gpu", false) -- Default: false - udev backend only, see "GPU rendering" below +srd.set("general.desktop_icons", true) -- Default: true - see "Desktop icons" below +srd.set("general.file_manager", "") -- Default: "" - empty means dispatch via `xdg-open` +srd.set("general.desktop_icon_single_click", false) -- Default: false - double-click opens an icon +srd.set("general.wallpaper_command", "") -- Default: "" - empty hides "Set as Wallpaper" entirely ``` `general.smart_placement`/`general.border_width` are not listed: neither is implemented - new-window placement always uses smart placement @@ -54,6 +58,45 @@ separate, lower-level override for testing without touching config -- either it or `general.gpu` being set is enough to attempt GPU rendering. +#### Desktop icons (`general.desktop_icons`) + +Real, individually-draggable desktop icons rendered above the wallpaper +and below every window, on the primary monitor only: fixed **Home** +(`$HOME`), **Computer** (`/`), and **Trash** (`~/.local/share/Trash/files`, +or `$XDG_DATA_HOME/Trash/files` if set) icons, plus one per real, +non-hidden entry of `~/Desktop` (created if it doesn't exist yet). On by +default - unlike `general.gpu`, this is a purely visual, directly +requested feature with no hardware-support question to hedge against. + +Hand-drawn glyphs, not real icon-theme artwork - no PNG/SVG decoding +capability exists anywhere in this codebase, so folder/computer/trash/file +icons are simple flat shapes, the same technique the titlebar's own +buttons use. + +Double-click (or a single click when `general.desktop_icon_single_click` +is `true`) opens an icon: `$general.file_manager <path>` if that key is +set, otherwise `xdg-open <path>`. Dragging an icon snaps it to the nearest +free grid cell on release and persists that cell to +`$XDG_STATE_HOME/srd/desktop-icons.json` (else `~/.local/state/srd/...`) -- +only icons the user has actually moved get an entry there; everything +else keeps recomputing its default slot on every rescan. + +Right-click an icon: "Open", plus "Set as Wallpaper" when it's an image +file (`.png`/`.jpg`/`.jpeg`/`.webp`/`.bmp`/`.gif`) and `general. +wallpaper_command` is set - shells out to `<wallpaper_command> <path>`. +srdwm never draws the wallpaper itself (an external layer-shell client's +job - `swww`, `awww`, or similar), so there is no universal default to +guess here the way `xdg-open` covers `file_manager`; this action simply +doesn't appear when the key is empty. Right-click bare desktop: "New +Folder" (creates `~/Desktop/New Folder`, de-duplicated as `New Folder +(2)`, `(3)`, ...) and "Refresh" (re-scans `~/Desktop`). + +Not implemented in this first pass, deliberately: moving a file to trash, +emptying the trash, filesystem watching (a file added to `~/Desktop` by +another program needs "Refresh" or a restart to appear), multi-select, +and per-mimetype icon art. The first two are destructive/hard-to-reverse +actions with no confirmation-dialog primitive to gate them on yet. + ### Monitor Settings (`monitor.*`) ```lua srd.set("monitor.primary_layout", "dynamic") -- Default: "dynamic" diff --git a/docs/TODO.md b/docs/TODO.md index 4201375..1de3cee 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -13,6 +13,36 @@ that has the full story. Keep this list current as items close or open; update the source doc's own entry too, don't let this drift into a second stale copy the way `PANEL_SUPPORT_TODO.md` did. +## Feature, implemented: real desktop icons plus the right-click desktop/icon menus (2026-08-25) + +Closes the "Right-click on bare desktop" item that used to sit under +"Explicitly requested, not yet started" - previously a true no-op +(`_ => {}` in `input/pointer.rs`'s button handler), nothing rendered above +the wallpaper at all. Follow-up request, asked directly: real desktop +icons "just like windows does" - Home/Computer/Trash plus one per real +`~/Desktop` entry, draggable, right-click menus, a New Folder action, and +(a later addition to the same round) a "Set as Wallpaper" action for +image files. + +Built as the sibling of the existing `context_menu.rs`/`snap_flyout.rs` +"compositor-owned floating UI" pattern - see `desktop_icons.rs`'s and +`desktop_menu.rs`'s own module doc comments for the full architecture. +Four new config keys (`general.desktop_icons`, default `true`; +`general.file_manager`, `general.desktop_icon_single_click`, `general. +wallpaper_command`, all default off/empty) - see DEFAULTS.md's own +"Desktop icons" section for the complete behavior writeup. + +Deliberately cut from this pass, stated up front rather than discovered +later: no move-to-trash and no "Empty Trash" (both destructive/hard-to- +reverse with no confirmation-dialog primitive to gate them on yet), no +filesystem watching (manual "Refresh" or a restart picks up an externally +added file), no multi-select, no per-mimetype icon art, icons on the +primary monitor only. + +Built, `cargo test --workspace` (124 wayland-crate tests, up from 106) and +`cargo clippy --workspace --all-targets` clean; installed, pending a live +restart to confirm. + ## Real bug, root-caused and fixed: a resize's own rapid-fire commits could get a window's rounded-corner content mask cached as blank, hiding real content until the next real content change (2026-08-25) Reported live: "terminal output/everything disappears when i sometimes resize terminal." `general.rounded_corners = true` in this machine's own live config, so the udev/Pixman content-masking path (`rounded_corners_pixman.rs`) is what's actually in play, not just a rarely-hit opt-in. @@ -1527,8 +1557,6 @@ persists. environment to confirm live. Needs an actual physical click test. ## Explicitly requested, not yet started -- [ ] **Right-click on bare desktop** - no handler exists at all - currently; requested, scope/design never discussed. - [ ] **Window-management-policy comparison vs. GlazeWM, Awesome, Openbox, RagnarWM** - all four cloned to `~/reference-wms/` and ready; the *rendering* comparison used niri and mutter (the only |