A desktop application for weighted random selection with a floating overlay window and system tray. Built with Tauri v2, Vue 3, TypeScript, and SQLite.
- Weighted Random Selection — Assign weights to items; the selection probability is proportional to the weight. Scroll animation runs on "Start", and clicking "Stop" picks one item. "Auto" mode picks automatically after a configurable delay.
- Multi-Config Support — Create, rename, copy, delete, and switch between multiple named configurations. Each config has its own items, settings, and history. Export/import configs as JSON files.
- Floating Window — A tiny transparent frameless window (190×48) that stays on top of all other windows. Provides a quick toggle to show/hide the main window.
- System Tray — Runs in the system tray with a context menu (toggle window, quit). Left-click on the tray icon toggles the main window's visibility.
- Admin Panel — A full settings modal with six tabs:
- General — Force reload, config management, auto-pick duration, always-on-top toggle.
- Items — Table with inline editing, add/delete/disable, import from text, batch operations, search/filter.
- History — Browse selections with date range and name filters; clear history.
- Statistics — Items ranked by selection count.
- Security — Set/change/remove an admin password (SHA-256 hashed with random salt).
- Custom — Customize every UI text string (labels, titles, hints, errors).
- Import/Export — Import items from text files (
name,weightper line). Export/import full configs as JSON. - Persistent Storage — All data stored locally in SQLite via Tauri's SQL plugin.
| Layer | Technology |
|---|---|
| Desktop Framework | Tauri v2 |
| Frontend | Vue 3 + TypeScript |
| Build Tool | Vite |
| UI Library | Ant Design Vue 4 |
| Database | SQLite via @tauri-apps/plugin-sql |
| Backend | Rust |
- Node.js 18+
- Rust (stable toolchain)
- Tauri v2 system dependencies (platform-specific)
# Install dependencies
npm install
# Start development with hot-reload
npm run tauri dev
# Build for production
npm run tauri buildThe Vite dev server runs on port 1420 and the Tauri desktop app launches automatically with hot-reload support.
├── index.html # Main window entry
├── floating.html # Floating overlay window entry
├── src/
│ ├── main.ts # Main window Vue app entry
│ ├── floating.ts # Floating window Vue app entry
│ ├── App.vue # Main window component
│ ├── FloatingWindow.vue # Floating overlay component
│ ├── db.ts # Database layer (SQL queries, logic)
│ └── components/
│ └── SettingsModal.vue # Admin settings panel
├── src-tauri/
│ ├── tauri.conf.json # Tauri app configuration
│ ├── src/
│ │ ├── main.rs # Rust entry point
│ │ └── lib.rs # Commands, tray, window management
│ ├── capabilities/
│ │ └── default.json # Tauri permissions
│ └── icons/ # Application icons
├── package.json
├── vite.config.ts
└── tsconfig.json
MIT