wren-linux / extras / file-manager.sh
#!/bin/bash
# Thunar, a light graphical file manager from Xfce (GTK, so it runs
# natively on Wayland), from Debian. gvfs gives it the Trash, tumbler
# draws thumbnails. USB drives are mounted with `usb mount`
# (parts/usb.sh), so Thunar's own volume manager isn't needed.
# Made the default for folders, e.g. "open containing folder" in Firefox.
# Usage: bash file-manager.sh [--remove | --manual]
# summary: Thunar file manager with Trash and thumbnails
# security: some
# category: files
# status: apt:thunar
. "$(dirname -- "${BASH_SOURCE[0]}")/../lib.sh"
if [ "${1:-}" = --manual ]; then print_manual; exit; fi
need_user
APP=thunar.desktop
if [ "${1:-}" = --remove ]; then
apt_purge thunar tumbler
unset_default_app "$APP"
exit
fi
say "Installing Thunar"
apt_install thunar gvfs tumbler
set_default_app "$APP" inode/directory
cat <<'TIPS'
How to use Thunar:
thunar open your home folder (or Super+d, thunar)
thunar ~/Downloads open a folder
Keys: Ctrl+L type a path, Ctrl+H show hidden files, Ctrl+T new tab,
F2 rename, Delete move to Trash, Shift+Delete delete for good,
Alt+Up parent folder, Ctrl+1/2/3 icon/list/compact view
TIPS