Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ zlack Public

A lightweight, optimized desktop wrapper for Slack, built with Tauri.

License

Notifications You must be signed in to change notification settings

sanguneo/zlack

Repository files navigation

Zlack

Zlack is a lightweight, optimized desktop wrapper for Slack, built with Tauri. It provides a native application experience with robust desktop notifications, handling deep links and window focus correctly even when minimized.

Zlack Icon

🚀 Features

  • Native Desktop Notifications: Integrated directly with Windows native toast notifications.
  • Smart Context: Extracts Team ID and Channel ID from Slack's console logs to ensure notifications take you to the exact right place.
  • Background Reliability: Includes a custom rust backend to ensure clicking a notification properly restores the window from the system tray and focuses it.
  • Multi-Workspace Support: Handles navigation for multiple Slack workspaces via standard webview login.
  • Lightweight: Uses Tauri's minimal footprint (WebView2 on Windows) instead of a full Chromium bundle (Electron).

🛠 Tech Stack

  • Frontend: Vanilla HTML/JS (Slack Web Client) + preload.js for bridge.
  • Backend: Rust (Tauri) for system integration.
  • Notification Engine: tauri-winrt-notification for advanced Windows Toast features (Inputs, Activation Callbacks).

📦 Installation

Download the installer for your OS:

Platform File
Windows Zlack.exe or Zlack_${version}_window.msi
macOS Zlack_${version}_macos.dmg
  1. Run the installer.
  2. Launch Zlack.
  3. Log in to your Slack workspaces.

🏗 Development

Prerequisites

Commands

Install Dependencies:

npm install

Run in Development Mode:

npm run tauri dev

Note: In dev mode, clicking notifications may not reliably restore the window due to Windows AUMID restrictions. This works fully in the built release.

Build for Production (Windows):

npm run build:dist:windows

This will compile the application and place the installer (.exe and .msi) into the dists/ folder.

Build for Production (macOS/Linux):

npm run build:dist:unix

This requires running on a Mac or Linux machine. It will generate .dmg/.app (macOS) or .deb/.AppImage (Linux) in the dists/ folder.

🧩 How It Works

Notification Interception

Slack's web client sends telemetry traces to /traces/v1/list_of_spans. Zlack's preload.js intercepts this network traffic:

  1. Captures notification:sent spans to reliably identify the Team ID and Channel ID associated with the event.
  2. Intercepts the browser's Notification API request.
  3. Merges the content with the captured network context and sends it to the Rust backend.

Robust Window Restoration

Clicking a notification on Windows while an app is minimized is notoriously tricky due to OS foreground rules. Zlack solves this by:

  1. Main Thread Architecture: Creates notification objects directly on the main thread to ensure proper COM listener persistence.
  2. Staged Restoration: Explicitly calls set_skip_taskbar(false), unminimize(), and show() in the correct order.
  3. Focus Hack: Uses a temporary "Always On Top" toggle to force the window into the foreground even if Windows tries to suppress it.

📄 License

MIT