brum 1.6.1

Multi-Pane Web Environment (File Commander/Manager) - By Woofson
# ==============================================================================
# 🐕 Brum Master Configuration File
# Location: ~/projects/brum/config.toml
# ==============================================================================

# --- Core Server Settings ---
[server]
host = "0.0.0.0"                 # "0.0.0.0" to listen on all network interfaces, "127.0.0.1" for local-only
port = 3140                      # Brum standard default port
root_path = "/"                  # Root filesystem path
upload_max_size_mb = 20480       # Max file upload size in MB (10 GB)
enable_auth = true               # Enable authentication (automatically disabled in --standalone mode)
session_duration_hours = 72      # JWT session expiry duration in hours
database_path = "brum.db"        # SQLite local metadata and session database

# --- Authentication & Access Control ---
[auth]
mode = "mixed"                   # Options: "mixed" (PAM + Built-in), "builtin", "pam", "none"
pam_service = "login"            # Linux PAM service name
allow_guest = false              # Allow anonymous guest access
default_admin_user = "admin"     # Initial admin username
default_admin_pass = "brum"      # Initial admin password

# --- Storage Roots & Filesystem Sandboxing ---
[storage]
allow_entire_system = true            # When true, admin users have unrestricted access to all local drives and system roots
default_user_home_template = "/home/{username}" # Template path for newly created virtual/DB users (e.g. "/data/users/{username}" or "C:/Users/{username}")
home_fallback_scheme = "auto"         # Options: "auto" (smart auto-creation & fallback cascade), "roots_only" (pure storage roots, no home), "strict"
auto_create_home_dirs = true          # Automatically create missing user home directories on login/init if writable

# Linux / Standard Mount Example
#[[storage.roots]]
#id = "storage"
#name = "Mass Storage"
#path = "/mnt/storage"
#read_only = false
# allowed_roles = ["admin", "user"]

#[[storage.roots]]
#id = "data"
#name = "Application Data"
#path = "/data"
#read_only = false

#[[storage.roots]]
#id = "backups"
#name = "Backups (Read-Only)"
#path = "/mnt/backups"
#read_only = true

# Windows Local Drive Example (supports forward slashes "D:/Media", single quotes 'D:\Media', or escaped "D:\\Media")
# [[storage.roots]]
# id = "d-drive"
# name = "D: Media Storage"
# path = "D:/Media"
# read_only = false

# Windows / Samba Network UNC Share Example (supports '//nas/share', '\\nas\share', or "\\\\nas\\share")
# [[storage.roots]]
# id = "nas-share"
# name = "Samba Public Share"
# path = "//192.168.1.100/share"
# read_only = false

# --- Remote SFTP / SSH Host Key Security ---
[storage.sftp]
host_key_checking = "tofu"          # Host key verification policy: "tofu" (Trust On First Use / auto-record), "strict" (must pre-exist in known_hosts), "auto_accept" (ignore/skip verification)
# known_hosts_file = "~/.ssh/known_hosts" # Optional custom known_hosts path (defaults to ~/.ssh/known_hosts or ~/.config/brum/known_hosts)

# --- User Interface & Panels ---
[ui]
default_pane_count = 2           # Default number of visible panes on startup (1 to 4)
default_layout = "dual-vertical" # Options: "single", "dual-vertical", "dual-horizontal", "triple", "quad"
show_hidden_files = true         # Show hidden files and dotfiles (e.g. .bashrc, .git)
default_view_mode = "details"    # Options: "details", "compact", "grid"
window_decorations = true        # Set to false for seamless borderless/frameless mode in Hyprland / tiling WMs
show_global_refresh = false      # Minimal header (off by default; individual panes have dedicated refresh controls)

# --- Web Terminal (Bite!) & PTY Security ---
[terminal]
enabled = true                      # Enable / disable the web terminal feature
allow_roles = ["admin", "root"]     # Roles allowed to spawn terminal shells ("admin", "user", "*" for all)
allow_virtual_users = false         # Allow virtual/DB accounts without a local POSIX user (disabled by default for security)
drop_privileges = true              # Drop root privileges to match authenticated user when running as root daemon
# default_shell = "/bin/bash"       # Override default shell executable

# --- Standalone Desktop Window & System Tray ---
[desktop]
minimize_to_tray = true          # Minimize window to system tray when closed instead of terminating
enable_tray = true               # Enable system tray icon
global_summon_hotkey = "Super+C" # System-wide shortcut to summon/focus Brum (e.g. "Super+C", "Ctrl+Alt+Space")
start_minimized = false          # Launch directly to system tray on system boot / autostart

# --- Color Themes & Aesthetics ---
[themes]
default_theme = "amber-charcoal" # Active theme ID: "amber-charcoal", "zink", "catppuccin-mocha", "nord", "gruvbox", etc.
                                 # Modular themes are located in themes/*.toml or ~/.config/brum/themes/*.toml

# --- Paranoid File Integrity & Safety ---
[paranoid]
enabled = true                   # Pre-flight collision checks and integrity verification
checksum_algorithm = "sha256"    # "sha256", "crc32"
verify_after_transfer = true     # Verify bit-for-bit checksums after copy/move
atomic_writes = true             # Write to temp file first before renaming
trash_enabled = true             # Move to system trash instead of permanent delete
confirm_delete = true            # Prompt before deleting files
confirm_overwrite = true         # Prompt before overwriting existing files

# --- Syncthing P2P Integration ---
[syncthing]
enabled = true
url = "http://127.0.0.1:8384"
api_key = ""                     # Leave blank to auto-discover from ~/.config/syncthing/config.xml

# --- NoteDog Notes & Markdown Studio ---
[notedog]
notes_folder = "~/Notes"         # Custom path to notes directory (e.g. "~/Notes", "/mnt/storage/Notes", "~/Documents/Notes")

# --- Context Menu Custom Script Actions ---
[[custom_actions]]
id = "sha256-calc"
label = "Calculate SHA-256 Checksum"
icon = "shield-check"
command = "builtin:checksum:sha256"
applicable_to = "file"
in_background = false

[[custom_actions]]
id = "folder-diff"
label = "Compare with Other Pane (Diff)"
icon = "columns-2"
command = "builtin:diff"
applicable_to = "all"
in_background = false

[[custom_actions]]
id = "compress-zip"
label = "Compress to .zip"
icon = "archive"
command = "builtin:archive:zip"
applicable_to = "all"
in_background = true

[[custom_actions]]
id = "compress-targz"
label = "Compress to .tar.gz"
icon = "archive"
command = "builtin:archive:targz"
applicable_to = "all"
in_background = true

[[custom_actions]]
id = "extract-here"
label = "Extract Archive Here"
icon = "unarchive"
command = "builtin:archive:extract"
applicable_to = "archive"
in_background = true

# --- Default Bookmarks & Favorite Paths ---
[[bookmarks]]
id = "home"
name = "Home Directory"
protocol = "local"
path = "~"

[[bookmarks]]
id = "root"
name = "Root Filesystem"
protocol = "local"
path = "/"