Add on-click action for usbctl using polkit

This commit is contained in:
Sam A. 2022-10-21 21:41:44 +02:00
parent b3c92557eb
commit 18e04de4c5
Signed by: samsapti
GPG Key ID: CBBBE7371E81C4EA
2 changed files with 5 additions and 3 deletions

View File

@ -5,6 +5,7 @@ exec mako
exec pipewire
exec pipewire-pulse
exec wireplumber
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Make xdg-desktop-portal-wlr work properly
exec dbus-update-activation-environment WAYLAND_DISPLAY

View File

@ -7,7 +7,7 @@
"modules-center": ["clock"],
"modules-right": ["network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"],
"sway/workspaces": {
"disable-scroll": true,
"disable-scroll": true
},
"sway/window": {
"max-length": 64
@ -83,8 +83,9 @@
},
"custom/usb": {
"format": "{} USB",
"exec": "$HOME/.config/waybar/usb-status.sh",
"exec": "${XDG_CONFIG_HOME:-$HOME/.config}/waybar/usb-status.sh",
"return-type": "json",
"interval": 1
"interval": 1,
"on-click": "pkexec --disable-internal-agent usbctl temporary"
}
}