Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Action Result
Click bar widget Open full-screen colony overlay
Scroll on bar widget Pan vertical slice (view different workspace rows)
SUPER+M Toggle overlay (configure in Hyprland keybinds)
Overlay: Mouse drag Pan view
Overlay: Mouse wheel Zoom
Overlay: H Toggle HUD
Overlay: W Toggle window rectangles
Overlay: C Toggle cursor repellent visualization
Overlay: ESC Close overlay

Configuration

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

[simulation]
tick_rate_hz = 10           # Simulation speed (Hz)
max_agents = 5000           # Max agent count
diffusion_rate = 0.12       # Trail spread speed
evaporation_rate = 0.015    # Trail fade speed
deposition_rate = 0.05      # Trail deposit amount

[food]
cpu_weight = 1.0            # CPU load → food
ram_weight = 0.3            # RAM pressure → food
network_weight = 0.5        # Network I/O → food
focus_weight = 2.0          # Focused window → food
decay_half_life_sec = 30    # Food persistence

[repellent]
cursor_radius_px = 200      # Cursor repellent radius
cursor_strength = 1.5       # Repellent strength

[visual]
colors_follow_theme = true  # Use Omarchy theme colors

[persistence]
auto_save_interval_sec = 300
save_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

Type Ratio Behavior
Scout 40% Random walk + weak chemotaxis, explores new territory
Harvester 35% Seeks nearest food, thickens trail on return path
Connector 15% Targets two food sources, forms loops (anastomosis)
Spore 10% Dormant until food appears, then blooms

Food Sources

Source Trigger Weight
CPU Per-core load > 10% 1.0
RAM Usage > 30% 0.3
Network I/O bursts > 0.1 MB/s 0.5
Window Focus Active window 2.0
Terminal High scroll/output rate 0.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

Component Target
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