swaywm focused WoW:F fishing tool
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-07 05:07:01 +00:00
src First commit 2026-11-06 19:41:30 -06:00
.gitignore Update .gitignore 2026-11-07 05:07:01 +00:00
Cargo.lock First commit 2026-11-06 19:41:30 -06:00
Cargo.toml First commit 2026-11-06 19:41:30 -06:00
README.md First commit 2026-11-06 19:41:30 -06:00

Sway Fisher GUI — experimental first version

Native Rust GUI for the Sway fishing controller. Uses eframe/egui, not Qt/Slint. This first version preserves the existing dim-red detector and frame-change metric so previously tested settings remain meaningful. It is not a general object recognizer or a verified unattended bot.

Requirements

  • Linux with Sway, grim, slurp, swaymsg, and working ydotool/ydotoold.
  • A recent stable Rust toolchain and native graphics/build development libraries.
  • Network access on the build machine for Cargo dependencies (no Cargo.lock is included).
  • ydotool daemon/socket permissions already configured as for the CLI version.

Build and run:

cargo build --release
./target/release/sway-fisher-gui

No root privileges are needed for the GUI. Do not run it as root. The GUI does NOT read FISH_* environment variables. Set these values in the UI. YDOTOOL_SOCKET is inherited unless a socket override is entered.

First use

  1. Stop the old CLI fishing process.
  2. Click Select water region. Keep UI, portraits and warm-colored terrain outside it.
  3. Use Test positioning once. Click Start, then focus WoW during the 5-second countdown. It casts, detects a candidate, and clicks after 3 seconds regardless of a bite.
  4. Review the saved candidate image. A green crosshair is not proof of correct detection.
  5. Set mode to Fishing and start again. Default threshold is 0.040; timeout 30 seconds.
  6. Returning focus to the GUI stops the worker. Start again to resume via a NEW session/cast.

The focus guard requires a focused window title containing 'World of Warcraft'. There is no window picker yet. The target ID is captured after the countdown. The preview crosshair is the original detection coordinate, NOT a tracked marker. Positioning may need validation for multi-seat or unusual display-scale arrangements.

Observe and calibrate

Both send NO keyboard/mouse input. Cast manually FIRST, then start the mode and focus WoW during the countdown. They require an existing visible bobber.

Observe graphs changes for the timeout duration without reeling. Calibrate records ordinary motion for the calibration duration, then suggests:

clamp(max_observed_score * 1.4 + 0.003, 0.005, 1.0)

This is a conservative BACKGROUND-ONLY suggestion, not a learned bite classifier. If a bite occurred during recording, discard the result and repeat. Results are only applied by clicking Apply suggestion; saving a preset is separate. A high suggestion can miss real bites. Do not treat it as proof of reliability. This version does not label bite examples, track candidates, adapt the threshold while fishing, recognize in-game time/location, or perform audio confirmation.

Presets

Load selected changes the active editor. Update selected overwrites that profile. Save as new appends a profile using the current name. Delete removes the selected profile, except the last one. Settings changes are not automatically saved.

Presets include name, location, manual lighting label, notes, region, threshold, keycode, timings, calibration duration, and optional socket path. Startup loads the FIRST saved profile, not necessarily the most recently used one. Saved region coordinates are absolute DESKTOP coordinates. After moving/resizing WoW or changing monitors/scaling, RESELECT and verify the region. No automatic geometry validation is implemented.

Configuration:

$XDG_CONFIG_HOME/sway-fisher/presets.json

Defaults to ~/.config/sway-fisher/presets.json. Back up this JSON to transfer profiles. There are no import/export dialogs yet. Invalid JSON falls back to defaults; back up before changing or saving a file you edited manually.

Diagnostics are stored in the same directory under diagnostics/:

  • fishing-region.png
  • fishing-candidate.png
  • event-before.png
  • event-after.png

Images are overwritten; event frames are the most recent threshold crossing, including observe-only crossings. The GUI event log is bounded and not persisted.

Stop behavior

STOP / Pause requests termination; it does not suspend a cast for later continuation. Focus changes terminate the session. Closing the GUI requests worker termination. The existing independent Sway stop binding remains usable:

bindsym $mod+Shift+F12 exec touch "$XDG_RUNTIME_DIR/sway-fisher.stop"

Clear the stop file in the GUI before starting again. Focus validation/input delivery is best-effort, not atomic. External subprocesses have no timeout yet; a hung command can delay ordinary worker stop handling.

Current limitations

  • Dim-red ranking can select warm UI or terrain; restrictive regions still matter.
  • Threshold crossing is not confirmed catching; no inventory/catch counter exists.
  • No bag detection, logout addon, audio detector, or automatic relogin.
  • No live parameter changes during a session; stop, edit, and restart.
  • No offline calibration against labeled clips, automatic profile switching, window-relative regions, or desktop-theme-native Qt widgets yet.
  • No compilation or runtime test against the user's actual machine was possible.

Game rules

External gameplay automation can violate the game's rules and risk account action. A native UI or screen-only detection does not remove that risk.