Add more options for USB unlocking
This commit is contained in:
parent
f76a5e7e9a
commit
14d7ce105a
|
@ -1,3 +1,8 @@
|
|||
#!/usr/bin/env dash
|
||||
|
||||
pkexec --disable-internal-agent usbctl temporary
|
||||
if usbctl check; then
|
||||
MODE="$([ "$1" = "--permanent" ] && printf "unprotect" || printf "temporary")"
|
||||
pkexec --disable-internal-agent usbctl "$MODE"
|
||||
else
|
||||
pkexec --disable-internal-agent usbctl protect
|
||||
fi
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
"exec": "usb-status.sh",
|
||||
"return-type": "json",
|
||||
"interval": 1,
|
||||
"on-click": "usb-unlock.sh"
|
||||
"on-click": "usb-unlock.sh",
|
||||
"on-click-right": "usb-unlock.sh --permanent"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue