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
exec pipewire-pulse exec pipewire-pulse
exec wireplumber exec wireplumber
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Make xdg-desktop-portal-wlr work properly # Make xdg-desktop-portal-wlr work properly
exec dbus-update-activation-environment WAYLAND_DISPLAY exec dbus-update-activation-environment WAYLAND_DISPLAY

View file

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