Czechball / usb-stick-alert

Bash script + udev ruleset that beeps when USB storage is connected / removed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usb-stick-alert

Bash script + udev ruleset that beeps when USB storage is connected / removed
Tested on Manjaro Linux 5.11.1-1-MANJARO

Installation

  • Clone the repository locally and enter its directory
    $ git clone https://github.com/Czechball/usb-stick-alert.git && cd usb-stick-alert

  • Copy the udev rules files to their directory
    # cp *.rules /etc/udev/rules.d/

  • Copy the alert script to /lib/udev
    # cp alert.sh /lib/udev/

  • Reload udev rules
    # udevadm control --reload

  • Fix PC Speaker permissions
    # rmmod pcspkr && modprobe pcspkr

Usage

When a USB storage device is connected, you will hear 2 beeps. When it's disconnected, you will hear 8 beeps with changing pitch.

About

Bash script + udev ruleset that beeps when USB storage is connected / removed


Languages

Language:Shell 100.0%