// Return to normal after SECONDARY + PAUSE_BETWEEN setTimeout(() => // Reset devices to whatever profile they were using GHub.resetAll(); // built‑in G Hub helper that restores original zones isRunning = false; , CONFIG.FLASH_DURATION * 2 + CONFIG.PAUSE_BETWEEN);
// ------------------------------------------------------------ // Helper: play the audio cue function playSound() const sound = new Audio(`$SCRIPT_PATH/$CONFIG.SOUND_PATH`); sound.play();
// Which devices should react? (true = include) TARGETS: mouse: true, keyboard: true, headset: true, lightStrip: true // Any G‑Series RGB strip , V.G Hub SharkBite 1 Script
// ---------- CONFIGURATION ---------- /* Adjust any of these values to suit your preferences */ const CONFIG = // Colors (RGB values) COLOR_PRIMARY: r: 255, g: 0, b: 0 , // Red (first flash) COLOR_SECONDARY: r: 0, g: 0, b: 255 , // Blue (second flash)
// Audio cue (must be .wav or .mp3 in same folder) SOUND_PATH: "sharkbite.wav", // Return to normal after SECONDARY + PAUSE_BETWEEN
// ------------------------------------------------------------ // SharkBite 1 – Logitech G Hub script // Author: Community (LogiHub) // Version: 1.0.0 // ------------------------------------------------------------
// Timing (in milliseconds) FLASH_DURATION: 150, // How long each color stays on PAUSE_BETWEEN: 100, // Gap before returning to normal state CONFIG.FLASH_DURATION * 2 + CONFIG.PAUSE_BETWEEN)
// 1️⃣ Play sound immediately playSound();