Skip to main content

Crate hazelnut

Crate hazelnut 

Source
Expand description

Hazelnut - Terminal-based automated file organizer

A Hazel-like file organization tool with a TUI interface.

Re-exports§

pub use config::Config;
pub use rules::Action;
pub use rules::Condition;
pub use rules::Rule;
pub use rules::RuleEngine;
pub use theme::Theme;
pub use watcher::Watcher;

Modules§

app
TUI Application module
autostart
Auto-start functionality for hazelnutd daemon
config
Configuration management
ipc
Inter-process communication between TUI and daemon
notifications
Desktop notifications for error alerts
rules
Rule engine - conditions and actions for file organization
theme
Theme configuration and colors.
watcher
File system watcher

Enums§

PackageManager
Detected package manager for installation
VersionCheck
Result of a version check

Constants§

VERSION
Current version from Cargo.toml

Functions§

check_for_updates_crates_io
Check for updates using crates.io API (no rate limits).
check_for_updates_crates_io_timeout
Check for updates using crates.io API with custom timeout.
clock_ticks_per_sec
Safe wrapper around libc::sysconf.
current_uid
Safe wrapper around libc::getuid.
detect_package_manager
Detect how hazelnut was installed
expand_path
Expand ~ and environment variables ($VAR, ${VAR}) in a path
format_uptime
Format a duration in seconds as a human-readable uptime string.
process_is_running
Safe wrapper around libc::kill. Returns true if the signal was delivered.
read_process_uptime
Read process uptime on Linux by parsing /proc. Returns a formatted uptime string or None if unavailable.
run_update
Run the update command and return the result.