Skip to content

Instantly share code, notes, and snippets.

View digital-pet's full-sized avatar

Cassandra of Troika digital-pet

View GitHub Profile
@juancarlospaco
juancarlospaco / 10-my-media-automount.rules
Last active October 17, 2022 15:16
UDev rule that auto mounts any hot-plugged device under /media/<label> and works seamlessly with vfat, ntfs, etc USB storages on Arch Linux. Paste this file and reboot:
# /etc/udev/rules.d/10-my-media-automount.rules
# start at sdb to ignore the system hard drive
KERNEL!="sd[b-z]*", GOTO="my_media_automount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"
# import some useful filesystem info as variables
IMPORT{program}="/sbin/blkid -o udev -p %N"