Yevgeniy Akimenko LogoYevgeniy Akimenko
home
projects
SkillSetGo!
LSavr
ReNoun
RanPic
ConCord
Innota
First Maps
⬡
Funnel
about
SkillSetGo!
LSavr
ReNoun
RanPic
ConCord
Innota
First Maps
⬡
Funnel

My story: Funnel

RustSlint UIMaterial Design 3Linux DesktopWayland & X11BashD-BusSerde
A native Linux desktop utility built with Rust and Slint using Material Design 3 components to interactively execute scripts, stream real-time terminal output, and manage working directories.
Funnel application screenshot
GitHub

Repeated Script Execution with Dynamic Arguments

Developers, sysadmins, and power users frequently rely on custom scripts to automate tasks that must be executed repeatedly across different targets—such as converting assets with varied parameters, running migrations against multiple environments, processing different batches of files, or testing commands with changing flags. In these workflows, the underlying script remains constant, but every run requires a different set of arguments.
Managing this repetition through standard terminal workflows quickly becomes tedious, requiring users to repeatedly cycle through shell history, manually edit long command strings, or juggle multiple terminal windows. At the same time, traditional desktop launchers and file manager shortcuts are built for static commands and cannot comfortably prompt for new arguments between runs, while spawning transient terminal windows creates jarring screen flickers and abruptly closes upon completion.
Funnel was created to solve this exact problem. Built as a lightweight, focused Linux desktop companion, Funnel keeps a target script ready in a dedicated runner interface. Users simply enter or adjust their dynamic arguments in an input field, trigger execution with a single keystroke or click, and monitor streaming output in real time within an integrated terminal view. By automatically resetting the input field upon success for the next run—while intelligently preserving arguments when a command fails—Funnel turns repetitive, argument-heavy script execution into a fast and frictionless workflow.

Declarative UI with Slint & Material Design 3

Rather than relying on heavy web-wrapper runtimes like Electron or complex legacy widget toolkits, Funnel is built with Slint, a modern GUI toolkit designed for Rust that compiles declarative UI markup directly into optimized native machine code. This architecture ensures instantaneous application startup, minimal memory overhead, and fluid performance across both modern Wayland compositors (GNOME, KDE Plasma, Sway, Hyprland) and classic X11 window managers.
The interface is designed with Slint's official Material Design 3 component library (@material), adopting tactile components such as ElevatedCard, TextField, and OutlineButton. Styled with a refined dark theme palette, crisp status badges, and typography utilizing Ubuntu Mono for paths and terminal streams, Funnel balances desktop visual polish with utility ergonomics.

Subprocess Orchestration & Smart Real-Time Streaming

A central challenge in building desktop execution tools is maintaining an uninhibited, responsive user interface while executing potentially long-running child processes. Funnel achieves this by decoupling process execution onto a dedicated background worker thread spawned via Rust's standard concurrency primitives.
When an execution is triggered, Funnel spawns a non-interactive bash process, configuring the working directory and piping standard output and standard error merged through a unified buffer (2>&1). A buffered reader streams incoming output lines concurrently to both the parent terminal console and the graphical UI through thread-safe callbacks, ensuring zero stutter or dropped frames in the interface.
A common frustration with live streaming log viewers is scroll management: automatically jumping to the bottom on every new line prevents users from inspecting earlier messages, while disabling autoscroll forces tedious manual tracking. Funnel implements an intelligent sticky autoscroll engine:
Dynamic Viewport Tracking: As long as the viewport remains at or near the bottom, incoming log lines automatically keep the scroll position pinned to the newest output.
Manual Scroll Detection: If the user scrolls upward by more than 10 pixels to review earlier logs, autoscroll instantly detaches, leaving the scroll position undisturbed.
Jump-to-Bottom Control: When autoscroll is paused, an intuitive “↓ Bottom” action button appears beside the Clear control. Clicking it—or scrolling back within 25 pixels of the bottom—smoothly snaps the viewport back to the tail and re-engages sticky autoscroll.

Context-Aware Directory Resolution & Linux Desktop Integration

Automation scripts frequently rely on their relative working directory (pwd) to manipulate files and traverse repository structures. Funnel incorporates a multi-tier directory resolution pipeline that understands how Linux desktop environments invoke applications:
File Manager Context Menus: When launched via custom file manager actions (such as GNOME Files scripts, Dolphin Service Menus, or Nemo actions), target paths are often passed as file:// URIs. Funnel features an integrated percent-decoding parser that resolves URL encodings (such as %20 to spaces) and canonicalizes target directories into standard system paths.
CLI & Terminal Inheritance: When invoked from a shell or script launcher, Funnel accepts explicit directory arguments, falling back to inheriting the caller's current working directory. The resolved directory is actively set as the process working directory and exported as an environment variable ($FUNNEL_WORKDIR), allowing invoked scripts to reference the target directory reliably.
Portal-Based File Picker: To allow users to browse and change scripts dynamically without hardcoding GTK or Qt dependencies, Funnel utilizes rfd (Rust File Dialog). Under the hood, this communicates via D-Bus with the active XDG Desktop Portal, displaying the user's native system file chooser regardless of desktop environment or containerization.
XDG Configuration Persistence: Once a script is selected, its absolute path is saved using Serde to a JSON configuration file adhering to the XDG Base Directory Specification (~/.config/funnel/config.json), restoring the script configuration automatically across reboots.

Robust Architecture, State Management & Testability

Handling command-line arguments within a graphical input field requires adhering to POSIX shell conventions. Funnel includes a custom argument tokenizer that supports single quotes ('...'), double quotes ("..."), and backslash escapes (\ ). This allows users to pass complex parameters containing whitespace—such as file paths, commit messages, or regex patterns—as single positional arguments ($1, $2) without unexpected splitting.
Funnel manages clear visual and operational states throughout execution:
Process Lifecycle & Input Guarding: Input controls and action buttons are automatically locked while a script is executing to prevent duplicate process spawns. A color-coded status indicator provides immediate feedback: green for Ready, amber for Running, red for Execution Error, and muted slate for Cleared.
Intelligent Input Preservation: Upon a successful run (exit code 0), the argument input field automatically clears to prepare for the next task. However, if the script fails or exits with a non-zero status code, Funnel deliberately preserves the entered argument string in the field, enabling users to correct flags or fix syntax without retyping from scratch.
Headless Integration Testing: The application architecture cleanly separates UI orchestration from the underlying Slint windowing backend via a dedicated controller abstraction (FunnelApp). Using i-slint-backend-testing, the project includes an automated integration test suite that simulates user interactions, mocks process execution threads, validates configuration persistence, and verifies error recovery in headless environments without requiring a running display server.
akimenkoy@gmail.com
LinkedIn
GitHub