This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do | |
( | |
syspath="${sysdevpath%/dev}" | |
devname="$(udevadm info -q name -p $syspath)" | |
[[ "$devname" == "bus/"* ]] && exit | |
eval "$(udevadm info -q property --export -p $syspath)" | |
[[ -z "$ID_SERIAL" ]] && exit | |
echo "/dev/$devname - $ID_SERIAL" | |
) | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async()=>{ | |
const dbus = require("dbus-next"); | |
const bus = dbus.systemBus(); | |
const obj = await bus.getProxyObject("org.freedesktop.GeoClue2", "/org/freedesktop/GeoClue2/Manager"); | |
const iFace = obj.getInterface("org.freedesktop.GeoClue2.Manager"); | |
const clientPath = await iFace.GetClient(); | |
const clientObj = await bus.getProxyObject("org.freedesktop.GeoClue2", clientPath); |