Automatic Screen Lock at Removal script

@engr Not the USB Serial, but the Nitrokey Serial (or from the PIV or PGP SC):

Nitrokey Serial

/* AABBC and DDEEF is the "short ID you will also see with the Nitrokey App 2. */

$ nitropy list
Command line tool to interact with Nitrokey devices 0.4.43
:: 'Nitrokey FIDO2' keys
:: 'Nitrokey Start' keys:
:: 'Nitrokey 3' keys
/dev/hidraw8: Nitrokey 3 AABBC<and-much-more>
/dev/hidraw9: Nitrokey 3 DDEEF<and-much-more>

PGP SmartCard

$ gpg-card LIST --cards
0* D276000124010304000FDDEEFxxx0000
1  D276000124010304000FAABBCxxx0000

PIV and PKCS#11

$ opensc-tool --list-readers
# Detected readers (pcsc)
Nr.  Card  Features  Name
0    Yes             Nitrokey Nitrokey 3 [CCID/ICCD Interface] 00 00
1    Yes             Nitrokey Nitrokey 3 [CCID/ICCD Interface] 01 00

$ opensc-tool --serial --reader 0
00 0F AA BB Cx xx ...$Z.
 $ opensc-tool --serial --reader 1
00 0F DD EE Fx xx ...pU.
$ pkcs11-tool --list-slots
Available slots:
Slot 0 (0x0): Nitrokey Nitrokey 3 [CCID/ICCD Interface] 00 00
  token label        : OpenPGP card (User PIN)
  token manufacturer : OpenPGP project
  token model        : PKCS#15 emulated
  token flags        : login required, token initialized, PIN initialized
  hardware version   : 3.4
  firmware version   : 3.4
  serial num         :  000fABBCxxx
  pin min/max        : 6/127
Slot 1 (0x1): Nitrokey Nitrokey 3 [CCID/ICCD Interface] 00 00
  token label        : OpenPGP card (User PIN (sig))
  token manufacturer : OpenPGP project
  token model        : PKCS#15 emulated
  token flags        : login required, token initialized, PIN initialized
  hardware version   : 3.4
  firmware version   : 3.4
  serial num         : 000fAABBCxxx
  pin min/max        : 6/127
Slot 2 (0x4): Nitrokey Nitrokey 3 [CCID/ICCD Interface] 01 00
  token label        : OpenPGP card (User PIN)
  token manufacturer : OpenPGP project
  token model        : PKCS#15 emulated
  token flags        : login required, token initialized, PIN initialized
  hardware version   : 3.4
  firmware version   : 3.4
  serial num         : 000fDDEEFxxx
  pin min/max        : 6/127
Slot 3 (0x5): Nitrokey Nitrokey 3 [CCID/ICCD Interface] 01 00
  token label        : OpenPGP card (User PIN (sig))
  token manufacturer : OpenPGP project
  token model        : PKCS#15 emulated
  token flags        : login required, token initialized, PIN initialized
  hardware version   : 3.4
  firmware version   : 3.4
  serial num         : 000fDDEEFxxx
  pin min/max        : 6/127

Edit: Fixed the PGP SC and PKCS#11 Serial