Skip to content

Repository files navigation

omarchy-slime-mold

A living Physarum polycephalum simulation in your Omarchy bar. Feeds on system activity, avoids your cursor, grows networks between busy windows.

Screenshot

Features

  • Living colony in your bar — horizontal slice shows trail activity in real-time
  • Full-screen overlay — zoomable, pannable view of the entire colony across all monitors
  • Feeds on your activity — CPU load, RAM pressure, network I/O, focused windows, terminal output
  • Avoids your cursor — mouse acts as repellent; mold flows around it
  • Theme-aware — colors sync with your Omarchy theme automatically
  • Persistent — colony survives reboots, Hyprland reloads, suspend/resume
  • Zero external dependencies — pure Python stdlib, no pip install needed

Install

# One-line install via omarchy CLI
omarchy plugin add https://github.com/bitshaker/omaslime.git --enable
# Or manual install
git clone https://github.com/bitshaker/omaslime.git
cd omaslime
./install.sh

Usage

ActionResult
Click bar widgetOpen full-screen colony overlay
Scroll on bar widgetPan vertical slice (view different workspace rows)
SUPER+MToggle overlay (configure in Hyprland keybinds)
Overlay: Mouse dragPan view
Overlay: Mouse wheelZoom
Overlay: HToggle HUD
Overlay: WToggle window rectangles
Overlay: CToggle cursor repellent visualization
Overlay: ESCClose overlay

Configuration

Edit ~/.config/omarchy/plugins/bitshaker.omaslime/config.toml:

[simulation]
tick_rate_hz = 10# Simulation speed (Hz)max_agents = 5000# Max agent countdiffusion_rate = 0.12# Trail spread speedevaporation_rate = 0.015# Trail fade speeddeposition_rate = 0.05# Trail deposit amount
[food]
cpu_weight = 1.0# CPU load → foodram_weight = 0.3# RAM pressure → foodnetwork_weight = 0.5# Network I/O → foodfocus_weight = 2.0# Focused window → fooddecay_half_life_sec = 30# Food persistence
[repellent]
cursor_radius_px = 200# Cursor repellent radiuscursor_strength = 1.5# Repellent strength
[visual]
colors_follow_theme = true# Use Omarchy theme colors
[persistence]
auto_save_interval_sec = 300save_on_exit = true

How It Works

Simulation Model

Hybrid agent-based + grid diffusion:

  • Agents (scouts, harvesters, connectors, spores) explore, seek food, form networks
  • Grid fields (256×144) handle trail diffusion, evaporation, food/repellent spread via GPU shaders
  • 10 Hz tick decoupled from 60 fps render

Agent Types

TypeRatioBehavior
Scout40%Random walk + weak chemotaxis, explores new territory
Harvester35%Seeks nearest food, thickens trail on return path
Connector15%Targets two food sources, forms loops (anastomosis)
Spore10%Dormant until food appears, then blooms

Food Sources

SourceTriggerWeight
CPUPer-core load > 10%1.0
RAMUsage > 30%0.3
NetworkI/O bursts > 0.1 MB/s0.5
Window FocusActive window2.0
TerminalHigh scroll/output rate0.8

Repellents

  • Mouse cursor — circular gradient (configurable radius/strength)
  • Idle workspaces — low-grade repellent after 5 min inactivity
  • Fullscreen apps — barrier (mold grows around, not over)

Architecture

omarchy-slime-mold/
├── manifest.json # Plugin metadata (Omarchy v1 schema)
├── BarWidget.qml # Bar item (shader + click handler)
├── Overlay.qml # Full-screen panel (zoom/pan, HUD, minimap)
├── config.toml.example # Configuration template
├── install.sh # Installer (systemd service + plugin registration)
├── uninstall.sh # Clean removal
├── src/
│ ├── main.py # Simulation coordinator (stdlib only)
│ └── sim/
│ ├── agent.py # Agent behaviors (scout/harvester/connector/spore)
│ ├── field.py # Grid fields (diffusion, evaporation, deposition)
│ ├── food.py # Food source management
│ └── persistence.py # Save/load (gzip JSON)
└── LICENSE

Data Flow

Hyprland events ──┐
/proc/stat ───────┤
/proc/meminfo ────┼──► Python simulation (10 Hz)
/proc/net/dev ────┤ │
▼ ▼
Field updates Agent updates
│ │
▼ ▼
Shared memory (mmap) ◄── QML ShaderEffect (60 fps)
│
▼
BarWidget.qml / Overlay.qml

Development

Run manually (for testing)

cd omarchy-slime-mold
python3 src/main.py

Key classes

  • SlimeMoldSimulation — main loop, Hyprland bridge, system metrics
  • AgentManager — population, birth/death, type behaviors
  • FieldManager — diffusion/evaporation on 4-channel grid
  • FoodManager — source spawn/decay/merge
  • StateManager — gzip JSON persistence

Adding a new food source

sim.food_manager.add_food_source(x, y, strength=0.5, food_type="custom")

Adding a repellent zone

sim.field_manager.add_repellent(grid_x, grid_y, radius, strength)

Performance

ComponentTarget
Simulation tick (5000 agents)< 5 ms
Field update (256×144)< 2 ms
Shared memory write< 1 ms
Bar render (shader)< 0.5 ms
Overlay render (4K)< 4 ms
Memory~30 MB

Auto-scales agent count if FPS drops.

Uninstall

./uninstall.sh
# Or
omarchy plugin remove bitshaker.omaslime

Removes plugin directory, systemd service, and optionally user data.

License

MIT — see LICENSE

Credits

About

A living Physarum polycephalum simulation in your Omarchy bar. Feeds on system activity, avoids your cursor, grows networks between busy windows.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages