Overview
Valent Flux is a context isolation controller for Linux desktops. Written in Rust and GTK4, it provides a system tray interface that allows users to instantly mutate their environment profile based on current work intent.
Flux handles wallpaper swaps, icon themes, notification levels, and desktop application allowlists locally with zero background daemon overhead.
Key Features
Ambient Control Plane
- Glassmorphic Control Center: Left-click the status tray icon to toggle a premium GTK4 control dashboard. Right-click opens a standard native radio button layout.
- Zero Background Polling: Strictly event-driven. Keeps CPU cycles and active memory profiles locked near zero.
Visual Context Shifting
- Flicker-Free Wallpaper Swaps: Triggers Wayland and X11 compositor background setters (GNOME, Plasma, Hyprland, swww, feh) using an atomic staging file rename pattern.
- Icon Theme Swapping: Dynamically mutates system-wide icon schema paths on the fly, forcing desktop file managers to adjust instantly.
Notification Inhibition
- D-Bus Commands: Connects directly to the
org.freedesktop.Notificationssession daemon to inhibit, filter, or whitelist active notification categories depending on focus profiles.
Sanctuaried Application Sets
- Focus Allowlist: Evicts distracting apps from your launcher using a local shadow desktop directory structure. Custom user
.desktopsettings are backed up cleanly as*.bakfiles. - Zero-State Cleanup: On exit, Flux cleanly purges user-space symlinks, restores original launcher configs, releases D-Bus notifications, and restores settings to their original state.
Configuration Spec
Configure wallpapers, notification rules, and allowed launchers in config.toml:
toml - config.toml
[environments.default]
icon = "water-drop"
wallpaper = "~/Wallpapers/default.png"
icon_theme = "Yaru"
notification_mode = "all"
allow_all_apps = true
[environments.deep_focus]
icon = "shield-target"
wallpaper = "~/Wallpapers/minimal-dark.png"
icon_theme = "Monochrome-Outline"
notification_mode = "critical_only"
allow_all_apps = false
allowed_apps = ["cursor.desktop", "firefox.desktop"]
Building & Running
Compile the Rust environment utility using Cargo:
1. Install Library Dependencies
bash - Package Check
# Install build-essential, pkg-config and GTK4 dev headers
sudo apt install build-essential pkg-config libgtk-4-dev
2. Build from Source
bash - Cargo Build
# Clone and build
git clone https://gitlab.com/quantum-hue/valent-flux.git
cd valent-flux
cargo build --release
# Run in background (system tray SNI daemon)
cargo run --release -- --daemon