mapsize 1.2.0: permanent delete and in-map reveal when headless

On a headless Linux or BSD system (no DISPLAY or WAYLAND_DISPLAY) nothing
empties the freedesktop trash, so trashing never freed space. There, d now
deletes permanently after an explicit confirmation, checking owner and type
against the scan and removing through an os.Root on the parent so a swapped
symlink cannot redirect it. o shows the folder in the map instead of
launching a file manager. Desktop sessions, macOS and Windows are unchanged.
This commit is contained in:
Andy Dixon
2026-10-03 12:50:07 +01:00
parent 352d4292df
commit 8d9344cfef
15 changed files with 214 additions and 27 deletions
+8 -4
View File
@@ -1,5 +1,5 @@
.\" Manual page for mapsize. View with: man -l docs/mapsize.1
.TH MAPSIZE 1 "October 2026" "mapsize 1.1.0" "User Commands"
.TH MAPSIZE 1 "October 2026" "mapsize 1.2.0" "User Commands"
.SH NAME
mapsize \- interactive terminal disk usage analyser with a navigable treemap
.SH SYNOPSIS
@@ -95,7 +95,7 @@ Useful over SSH, where \fBCOLORTERM\fR is often not forwarded.
Disable mouse support. Everything works from the keyboard.
.TP
.B \-\-read\-only
Disable every action that modifies the filesystem (moving to trash) and
Disable every action that modifies the filesystem (trash and delete) and
show \fBREAD ONLY\fR in the header. Saving a snapshot file is still
allowed. This does not make
.B mapsize
@@ -223,10 +223,14 @@ Toggle allocated / logical size.
Copy the selected path to the clipboard (OSC 52; terminal support varies).
.TP
.B o
Reveal the selected item in the desktop file manager.
Reveal the selected item in the desktop file manager. On a headless system
(no \fBDISPLAY\fR or \fBWAYLAND_DISPLAY\fR), show the folder in the map
instead.
.TP
.BR d ", " Delete
Move the selected item to the trash after confirmation. Disabled with
Move the selected item to the trash after confirmation. On a headless
Linux or BSD system, where nothing would empty the trash, delete it
permanently instead after a confirmation that says so. Disabled with
\fB\-\-read\-only\fR, for snapshots, and while scanning.
.TP
.B s