Skip to content

Instantly share code, notes, and snippets.

@dkopecek
Created August 10, 2017 13:21
Show Gist options
  • Save dkopecek/0d4bcad009354483d664c21f56a82804 to your computer and use it in GitHub Desktop.
Save dkopecek/0d4bcad009354483d664c21f56a82804 to your computer and use it in GitHub Desktop.
#!/bin/sh
POLICY_UNLOCKED=apply-policy
POLICY_LOCKED=reject
revert() {
usbguard set-parameter InsertedDevicePolicy $POLICY_UNLOCKED
}
trap revert SIGHUP SIGINT SIGTERM
usbguard set-parameter InsertedDevicePolicy $POLICY_LOCKED
i3lock -n
revert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment