polybar-scripts/polybar-scripts/system-usb-udev
x70b1 fbd62e906f system-usb-udev: fix lsblk (close #109) 2019-01-07 19:51:29 +01:00
..
screenshots add system-usb-udev 2018-01-27 06:29:31 +01:00
95-usb.rule system-usb-udev: fix lsblk (close #109) 2019-01-07 19:51:29 +01:00
README.md system-usb-udev: use a pid file 2018-07-29 15:49:32 +02:00
system-usb-udev.sh system-usb-udev: fix lsblk (close #109) 2019-01-07 19:51:29 +01:00

README.md

Script: system-usb-udev

A small script that shows your mounted and not mounted removable devices. This is an extended version of system-usb-mount.

Click left to mount all removable devices. Click right to unmount the devices. The removable devices are then turned off with udisksctl power-off.

The mount option has a feature: You can also start a file manager and open the device when you mount it. Look at the example in the code: terminal -e "bash -lc 'filemanager $mountpoint'" &

This script is able to display device changes in real time. For this udev is being used.

system-usb-mount system-usb-mount

Dependencies

  • jq
  • udisks2

Configuration

Copy 95-usb.rules to /etc/udev/rules.d/95-usb.rules. Make sure that the paths in the file have been modified properly.

Also change the file path in line #45.

Module

[module/system-usb-udev]
type = custom/script
exec = ~/polybar-scripts/system-usb-udev.sh
tail = true
click-left = ~/polybar-scripts/system-usb-udev.sh --mount
click-right = ~/polybar-scripts/system-usb-udev.sh --unmount