some changes
This commit is contained in:
parent
f6b8740397
commit
f48ebc2c7a
|
|
@ -138,7 +138,7 @@ type = custom/script
|
|||
exec = ~/.config/polybar/scripts/nordvpn/vpn_module.sh
|
||||
click-left = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --toggle-connection
|
||||
click-right = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --location-menu
|
||||
click-middle = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --ip_address &
|
||||
click-middle = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --ip_address
|
||||
interval = 5
|
||||
format = " <label> "
|
||||
format-background = ${colors.color3}
|
||||
|
|
|
|||
|
|
@ -73,20 +73,19 @@ COUNTRIES=("Albania" "Argentina" "Australia" "Austria" "Belgium" "Bosnia" "Brazi
|
|||
# Concatenate favorite and country arrays
|
||||
VPN_LOCATIONS+=("${COUNTRIES[@]}")
|
||||
|
||||
|
||||
vpn_report() {
|
||||
# continually reports connection status
|
||||
if [ "$VPN_STATUS" = "$CONNECTED" ]; then
|
||||
ip_address=$($VPN_GET_STATUS | sed -n 5p | cut -c 13-27)
|
||||
# if [ "$VPN_STATUS" = "$CONNECTED" ]; then
|
||||
# ip_address=$($VPN_GET_STATUS | sed -n 5p | cut -c 13-27)
|
||||
# move this above the first if statement if something breaks
|
||||
|
||||
if [ "$VPN_STATUS" = "$CONNECTED" ]; then
|
||||
country=$($VPN_GET_STATUS | sed -n 3p | cut -c 10-16)
|
||||
city=$($VPN_GET_STATUS | sed -n 4p | cut -c 7-14)
|
||||
echo "%{F$COLOR_CONNECTED}$city $country%{F-}"
|
||||
else
|
||||
echo "%{F$COLOR_CONNECTED}$ip_address%{F-}"
|
||||
fi
|
||||
#else
|
||||
# echo "%{F$COLOR_CONNECTED}$ip_address%{F-}"
|
||||
#fi
|
||||
else
|
||||
echo "%{F$COLOR_DISCONNECTED}No VPN%{F-}"
|
||||
fi
|
||||
|
|
@ -191,11 +190,11 @@ vpn_location_menu() {
|
|||
ip_address_to_clipboard() {
|
||||
# finds your IP and copies to clipboard
|
||||
# could also use https://ifconfig.io, checkip.amazonaws.com
|
||||
ip_address=$(curl --silent https://ipaddr.pub)
|
||||
echo "$ip_address" | xclip -selection clipboard
|
||||
ip_address=$($VPN_GET_STATUS | sed -n 5p | cut -c 14-28)#ip_address=$(curl --silent https://ipaddr.pub)
|
||||
echo $ip_address | xclip -selection clipboard
|
||||
|
||||
# TODO: why doesn't this echo display in polybar?
|
||||
echo "$ip_address"
|
||||
# echo "$ip_address"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1061,6 +1061,8 @@
|
|||
typeset -g POWERLEVEL9K_BATTERY_VISUAL_IDENTIFIER_EXPANSION=''
|
||||
# Set battery background to none
|
||||
typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=''
|
||||
# Don't show battery if it's at or above this charge level.
|
||||
typeset -g POWERLEVEL9K_BATTERY_HIDE_ABOVE_THRESHOLD=30
|
||||
####################################[ time: current time ]####################################
|
||||
# Current time color.
|
||||
typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
|
||||
|
|
|
|||
|
|
@ -29,12 +29,11 @@ networkmanager-dmenu-git
|
|||
nordvpn-bin
|
||||
pacback
|
||||
pbincli
|
||||
picom-tryone-git
|
||||
picom-git
|
||||
polybar-git
|
||||
qt5-styleplugins
|
||||
ranger-git
|
||||
redshift-minimal
|
||||
riot-desktop-git
|
||||
systemd-boot-pacman-hook
|
||||
ttf-weather-icons
|
||||
twmn-git
|
||||
|
|
|
|||
Loading…
Reference in New Issue