Skip to content

Instantly share code, notes, and snippets.

View TurnrDev's full-sized avatar

Jay Turner TurnrDev

  • Mopo
  • Nottingham
  • 06:01 (UTC +01:00)
View GitHub Profile
@TurnrDev
TurnrDev / dockmgr
Last active June 15, 2026 08:53
A simple script to watch for a connected USB device and trigger profiles
#!/usr/bin/env bash
# USB profile watcher.
# Runs with bash or zsh: bash ~/dockmgr watch, zsh ~/dockmgr watch, or just ~/dockmgr watch.
# Profile USB IDs. Space-separated vendor:product pairs.
# Work profile, from your connected lsusb output:
# Bus 002 Device 002: ID 05e3:0625 Genesys Logic, Inc. USB3.2 Hub
# Bus 002 Device 003: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
# Bus 003 Device 006: ID 05e3:0610 Genesys Logic, Inc. Hub
# Bus 003 Device 007: ID 05e3:0608 Genesys Logic, Inc. Hub
@TurnrDev
TurnrDev / monitors.sh
Last active January 22, 2026 13:58 — forked from Diaoul/monitors.sh
Arrange workspace on multiple monitors (Hyprland)
#!/usr/bin/env bash
set -e
declare -i last_called=0
declare -i throttle_by=4
@throttle() {
local -i now=$(date +%s)
if (($now - $last_called > $throttle_by))
then