Selaa lähdekoodia

Minor updates

Simon Watson 3 vuotta sitten
vanhempi
commit
00e8d6636f
2 muutettua tiedostoa jossa 15 lisäystä ja 1 poistoa
  1. 4 0
      bashrc/bashrc-all
  2. 11 1
      lemonbar/swatson-casana/bar.sh

+ 4 - 0
bashrc/bashrc-all

@@ -120,6 +120,10 @@ case $(hostname) in
 
 	alias ssh-old="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1"
 	alias sleep-open="sudo zzz && slock"
+	alias ssh-aws="ssh -i .ssh/aws_key"
+
+	# Load non tracked aliases for work specific things
+	source ~/Work/secure_shell_aliases 
 	
 	echo "Loaded Void Work Config"
 	;;

+ 11 - 1
lemonbar/swatson-casana/bar.sh

@@ -2,6 +2,16 @@
 
 div="%{F#0092ff}<>%{F-}%{B-}"
 
+aws_vpn_status() {
+    INTERFACE_CHECK=$(ip a | grep tun0)
+    if [[ ! -z $INTERFACE_CHECK ]]; then
+	INTERFACE_VALUE=$(echo $INTERFACE_CHECK | tail -n1 | awk '{print $15}')
+	echo -n "AWS VPN IP: $INTERFACE_VALUE"
+    else
+	echo -n "AWS VPN Down"
+    fi
+}
+
 Clock() {
         DATETIME=$(date "+%a %b %d, %T")
 
@@ -94,6 +104,6 @@ soundState() {
 
 while true; do
 	sleep 1
-	echo "%{l} $(Clock)  $div  $(cpuTemp)  $div  $(loadAvg)  $div  $(wifiInfo)  $div  $(ethPort)  $div  $(diskFree)  $div  $(soundState)  $div  $(batteryInfo)  $div  "
+	echo "%{l} $(Clock)  $div  $(cpuTemp)  $div  $(loadAvg)  $div  $(wifiInfo)  $div  $(ethPort)  $div  $(diskFree)  $div  $(soundState)  $div  $(batteryInfo)  $div  $(aws_vpn_status)"
         sleep 0.5
 done