os/arch: add automount sub-topic
This commit is contained in:
parent
6165a90230
commit
ce2923f6be
4
os/arch/automount/README.md
Normal file
4
os/arch/automount/README.md
Normal 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`.
|
6
os/arch/automount/bin/notify-mount
Executable file
6
os/arch/automount/bin/notify-mount
Executable 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 &
|
9
os/arch/automount/install
Normal file
9
os/arch/automount/install
Normal 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
|
Loading…
Reference in a new issue