some changes

This commit is contained in:
Harri Lahtinen 2020-09-18 17:49:46 +03:00
parent f6b8740397
commit f48ebc2c7a
4 changed files with 12 additions and 12 deletions

View File

@ -138,7 +138,7 @@ type = custom/script
exec = ~/.config/polybar/scripts/nordvpn/vpn_module.sh exec = ~/.config/polybar/scripts/nordvpn/vpn_module.sh
click-left = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --toggle-connection click-left = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --toggle-connection
click-right = ~/.config/polybar/scripts/nordvpn/vpn_module.sh --location-menu 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 interval = 5
format = "  <label> " format = "  <label> "
format-background = ${colors.color3} format-background = ${colors.color3}

View File

@ -73,20 +73,19 @@ COUNTRIES=("Albania" "Argentina" "Australia" "Austria" "Belgium" "Bosnia" "Brazi
# Concatenate favorite and country arrays # Concatenate favorite and country arrays
VPN_LOCATIONS+=("${COUNTRIES[@]}") VPN_LOCATIONS+=("${COUNTRIES[@]}")
vpn_report() { vpn_report() {
# continually reports connection status # continually reports connection status
if [ "$VPN_STATUS" = "$CONNECTED" ]; then # if [ "$VPN_STATUS" = "$CONNECTED" ]; then
ip_address=$($VPN_GET_STATUS | sed -n 5p | cut -c 13-27) # ip_address=$($VPN_GET_STATUS | sed -n 5p | cut -c 13-27)
# move this above the first if statement if something breaks # move this above the first if statement if something breaks
if [ "$VPN_STATUS" = "$CONNECTED" ]; then if [ "$VPN_STATUS" = "$CONNECTED" ]; then
country=$($VPN_GET_STATUS | sed -n 3p | cut -c 10-16) country=$($VPN_GET_STATUS | sed -n 3p | cut -c 10-16)
city=$($VPN_GET_STATUS | sed -n 4p | cut -c 7-14) city=$($VPN_GET_STATUS | sed -n 4p | cut -c 7-14)
echo "%{F$COLOR_CONNECTED}$city $country%{F-}" echo "%{F$COLOR_CONNECTED}$city $country%{F-}"
else #else
echo "%{F$COLOR_CONNECTED}$ip_address%{F-}" # echo "%{F$COLOR_CONNECTED}$ip_address%{F-}"
fi #fi
else else
echo "%{F$COLOR_DISCONNECTED}No VPN%{F-}" echo "%{F$COLOR_DISCONNECTED}No VPN%{F-}"
fi fi
@ -191,11 +190,11 @@ vpn_location_menu() {
ip_address_to_clipboard() { ip_address_to_clipboard() {
# finds your IP and copies to clipboard # finds your IP and copies to clipboard
# could also use https://ifconfig.io, checkip.amazonaws.com # could also use https://ifconfig.io, checkip.amazonaws.com
ip_address=$(curl --silent https://ipaddr.pub) 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 echo $ip_address | xclip -selection clipboard
# TODO: why doesn't this echo display in polybar? # TODO: why doesn't this echo display in polybar?
echo "$ip_address" # echo "$ip_address"
} }

View File

@ -1061,6 +1061,8 @@
typeset -g POWERLEVEL9K_BATTERY_VISUAL_IDENTIFIER_EXPANSION='' typeset -g POWERLEVEL9K_BATTERY_VISUAL_IDENTIFIER_EXPANSION=''
# Set battery background to none # Set battery background to none
typeset -g POWERLEVEL9K_BATTERY_BACKGROUND='' 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 ]#################################### ####################################[ time: current time ]####################################
# Current time color. # Current time color.
typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 typeset -g POWERLEVEL9K_TIME_FOREGROUND=66

View File

@ -29,12 +29,11 @@ networkmanager-dmenu-git
nordvpn-bin nordvpn-bin
pacback pacback
pbincli pbincli
picom-tryone-git picom-git
polybar-git polybar-git
qt5-styleplugins qt5-styleplugins
ranger-git ranger-git
redshift-minimal redshift-minimal
riot-desktop-git
systemd-boot-pacman-hook systemd-boot-pacman-hook
ttf-weather-icons ttf-weather-icons
twmn-git twmn-git