dotfiles
dotfiles copied to clipboard
[FEATURE] Add VPN module to waybar
I have made a little waybar module that shows VPN connection status. If this is something you think is useful you can add it as optional module to waybar.
modules config:
"custom/vpn": {
"format": "{icon} vpn",
"exec": "~/.config/custom/scripts/waybar-vpn.sh",
"interval": 5,
"tooltip": true,
"return-type": "json",
"format-icons" : {
"active": "",
"inactive": ""
}
}
custom script:
#!/bin/bash
# Get VPN information
vpn_info=$(nmcli c show --active | grep -w "vpn")
# Check if VPN is active
if [ -n "$vpn_info" ]; then
# Extract VPN name and interface
vpn_name=$(echo "$vpn_info" | awk '{print $1}')
vpn_interface=$(echo "$vpn_info" | awk '{print $NF}')
# Output for Waybar to use format-icons "vpn-active"
echo "{\"name\": \"$vpn_name\", \"tooltip\": \"VPN: $vpn_name\nInterface: $vpn_interface\", \"alt\": \"active\"}"
else
# Output for Waybar to use format-icons "vpn-inactive"
echo "{\"tooltip\": \"No VPN connection active\", \"alt\": \"inactive\"}"
fi
style:
#custom-vpn {
background-color: @backgroundlight;
font-size: 16px;
color: @textcolor2;
border-radius: 15px;
padding: 2px 10px 0px 10px;
margin: 8px 15px 8px 0px;
opacity:0.8;
}
And ofc add it to config "custom/vpn"
Hello @pendula95 Do you know if Zoom sharing screen functionality works for you in Hyprland? When I share my screen, I can only see a black screen. Having this feature fixed and the addition of a VPN option in waybay will allow me to use this as my main daily driver for work OS.
Hello @pendula95 Do you know if Zoom sharing screen functionality works for you in Hyprland? When I share my screen, I can only see a black screen. Having this feature fixed and the addition of a VPN option in waybay will allow me to use this as my main daily driver for work OS.
Are you using zoom via browser or native app?
Via app installed from the AUR. I’ve tried recently but when clicking share screen button, nothing happens.
Sincerely,
Jose Villamizar
On Sun, Dec 15, 2024 at 4:20 PM Lazar Bulić @.***> wrote:
Hello @pendula95 https://github.com/pendula95 Do you know if Zoom sharing screen functionality works for you in Hyprland? When I share my screen, I can only see a black screen. Having this feature fixed and the addition of a VPN option in waybay will allow me to use this as my main daily driver for work OS.
Are you using zoom via browser or native app?
— Reply to this email directly, view it on GitHub https://github.com/mylinuxforwork/dotfiles/issues/330#issuecomment-2544071324, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANYDF2NJSTCJ7PQBEUISLJT2FXXB5AVCNFSM6AAAAABP7QKQZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBUGA3TCMZSGQ . You are receiving this because you commented.Message ID: @.***>
@mcvills Probably this can help: https://wiki.archlinux.org/title/Zoom_Meetings#Screen_share
Would this also be possible for wireguard?
Here is the update script for waybar-vpn.sh
#!/bin/bash
# Get VPN information
vpn_info=$(nmcli c show --active | grep -Ew "vpn|wireguard")
# Check if VPN is active
if [ -n "$vpn_info" ]; then
# Extract VPN name and interface
vpn_name=$(echo "$vpn_info" | awk '{print $1}')
vpn_interface=$(echo "$vpn_info" | awk '{print $NF}')
# Output for Waybar to use format-icons "vpn-active"
echo "{\"name\": \"$vpn_name\", \"tooltip\": \"VPN: $vpn_name\nInterface: $vpn_interface\", \"alt\": \"active\"}"
else
# Output for Waybar to use format-icons "vpn-inactive"
echo "{\"tooltip\": \"No VPN connection active\", \"alt\": \"inactive\"}"
fi