Add keybinding for USB unlock

This commit is contained in:
Sam A. 2022-10-28 17:59:55 +02:00
parent 18e04de4c5
commit f76a5e7e9a
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
4 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,3 @@
#!/usr/bin/env dash
pkexec --disable-internal-agent usbctl temporary

View file

@ -23,6 +23,9 @@ bindsym $mod+Shift+c reload
# Lock the screen
bindsym $mod+l exec swaylock
# Unlock USB protection
bindsym $mod+u exec usb-unlock.sh
# Session and power management
bindsym $mod+Shift+e exec swaynag -t logout -m 'Log out?' -b 'Yes' 'swaymsg exit'
bindsym $mod+Shift+r exec swaynag -t reboot -m 'Reboot?' -b 'Yes' 'doas reboot'

View file

@ -83,9 +83,9 @@
},
"custom/usb": {
"format": "{} USB",
"exec": "${XDG_CONFIG_HOME:-$HOME/.config}/waybar/usb-status.sh",
"exec": "usb-status.sh",
"return-type": "json",
"interval": 1,
"on-click": "pkexec --disable-internal-agent usbctl temporary"
"on-click": "usb-unlock.sh"
}
}