os/arch: add automount sub-topic

This commit is contained in:
Henrik Lissner 2016-12-29 00:20:10 -05:00
parent 6165a90230
commit ce2923f6be
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# Device automounting (powered by udevil)
Sets up udevil+devmon to look out for new devices, auto-mounts them, then notifies you
via `notify-send`.

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# A script run by devmon/udevil when a device is mounted or unmounted, notifying me.
DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send -a "devmon" "Device change" "$2"
aplay -N -q /usr/share/sounds/ding.wav &

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
[[ -f /etc/arch-release ]] || exit
sudo pacman -Ss udevil
sudo systemctl enable devmon@$(whoami)
sudo systemctl start devmon@$(whoami)
sudo sed -i 's@^# \(success_exec =\)@\1 /home/hlissner/.dotfiles/os/arch/udevil/bin/notify-mount@' udevil.conf